Realtime 3.1-maybe-beta (12.2 base)
Posted: 27 Apr 2019 07:14
This is a version of OpenTTD in which the game time can be slowed down to practically real time.
Unlike previous day lenght patches, this one does not stretch the day but has the core rewritten to enable it to run at any speed desired.
The main change for the original patch goal has been to switch all neccessary command functions to use the already existing command container.
Doing this basically eliminates all limits of the game, like the different amounts of roads, rail, cargo types that could be used.
Status: Alpha migration to CommandContainer done.
What remains is clean-up like removing commented-out original code, replacing the used command containers with smaller, individual structs,
and cleaning up and maybe consolidating the three core command functions. Also, network testing.
Work in progress:
Improved scheduling for vehicles: Departure and wait times can be set for vehicles to stay at stations or depots. Interval time can be set for
the complete route to automatically update departure times. Arrival times can be set but have no function right now.
Working on the display of relevant times in time table window.
Enabling larger maps: Sizes larger than 16k x 16k can be set, although there is no check on total size of XxY, so use with caution.
Creating a map in scenario editor first might be needed to begin a new game.
Loans are automatically paid off at the end of the day when the balance is more than 1000 in the plus. Will make it a optional setting later.
Side effects:
Changes made while working on the major parts: Refactoring code at various places, Added a tile cache for read-mostly tile data that had to be
calculated every time. Exchanged the CFollowTrack template for more streamlined versions for rail, road, and water to improve performance.
Splitting groups of related functions in large source files off into their own .cpp, _func.h, and _type.h files for clarity. This also exposes the
mess of included header files.
Splitting large functions into smaller ones, sometimes reducing executable size by a little.
Removed implicit order usage.
Skipped a few blitter inherited classes to improve performance for sse2 (and sse4?).
Adding category subdirectories and moving relevant source files in those to lessen the amount of files in src root.
Unlocked all industries, cargoes, and vehicles from every climate apart from Toyland ones (but including plastic).
Possible future features:
Arrival and departure board for stations and the like.
Rewriting and integrating the shunting patch. Think working cargo yards where consists are split up and re-assembled for the next part of the route.
Enable the same possibility to carry different cargos for articulated road vehicles, just like trains.
Tile locking and change status to maybe enable running the landscape part in a seperate thread, and only iterating over tiles that have actually changed.
In that train of thought I'm wondering about using a database backend like SQLite.
Migration of windowing system to wxWidgets. I like to see multiple viewports and management windows without cluttering one main window.
Also being able to switch through them like regular programs.
Gradual build of road/rail as in Simcity.
Demand based economy instead of production based. End customers place orders at producers, who place orders at suppliers, etc., and cargopackets
are created when the required supplies are delivered. Unfulfilled orders will be removed after a set time. Not transporting in time? No monies.
Limit vehicles by amount of coal mined (steam locomotives) and delivered and or amount of power stations (electric locomotives),
as well as oil and refineries (road vehicles)?
Improve YAPF to take waypoints and line ends into account for routes, so it will for instance use a siding to reverse direction into a depot.
Diagonal roads?
---
Complete src directory to replace the 12.2 src directory of the official release: .
Linux package: .
No Windows build because it seems cross compiling no longer works.
Unlike previous day lenght patches, this one does not stretch the day but has the core rewritten to enable it to run at any speed desired.
The main change for the original patch goal has been to switch all neccessary command functions to use the already existing command container.
Doing this basically eliminates all limits of the game, like the different amounts of roads, rail, cargo types that could be used.
Status: Alpha migration to CommandContainer done.
What remains is clean-up like removing commented-out original code, replacing the used command containers with smaller, individual structs,
and cleaning up and maybe consolidating the three core command functions. Also, network testing.
Work in progress:
Improved scheduling for vehicles: Departure and wait times can be set for vehicles to stay at stations or depots. Interval time can be set for
the complete route to automatically update departure times. Arrival times can be set but have no function right now.
Working on the display of relevant times in time table window.
Enabling larger maps: Sizes larger than 16k x 16k can be set, although there is no check on total size of XxY, so use with caution.
Creating a map in scenario editor first might be needed to begin a new game.
Loans are automatically paid off at the end of the day when the balance is more than 1000 in the plus. Will make it a optional setting later.
Side effects:
Changes made while working on the major parts: Refactoring code at various places, Added a tile cache for read-mostly tile data that had to be
calculated every time. Exchanged the CFollowTrack template for more streamlined versions for rail, road, and water to improve performance.
Splitting groups of related functions in large source files off into their own .cpp, _func.h, and _type.h files for clarity. This also exposes the
mess of included header files.
Splitting large functions into smaller ones, sometimes reducing executable size by a little.
Removed implicit order usage.
Skipped a few blitter inherited classes to improve performance for sse2 (and sse4?).
Adding category subdirectories and moving relevant source files in those to lessen the amount of files in src root.
Unlocked all industries, cargoes, and vehicles from every climate apart from Toyland ones (but including plastic).
Possible future features:
Arrival and departure board for stations and the like.
Rewriting and integrating the shunting patch. Think working cargo yards where consists are split up and re-assembled for the next part of the route.
Enable the same possibility to carry different cargos for articulated road vehicles, just like trains.
Tile locking and change status to maybe enable running the landscape part in a seperate thread, and only iterating over tiles that have actually changed.
In that train of thought I'm wondering about using a database backend like SQLite.
Migration of windowing system to wxWidgets. I like to see multiple viewports and management windows without cluttering one main window.
Also being able to switch through them like regular programs.
Gradual build of road/rail as in Simcity.
Demand based economy instead of production based. End customers place orders at producers, who place orders at suppliers, etc., and cargopackets
are created when the required supplies are delivered. Unfulfilled orders will be removed after a set time. Not transporting in time? No monies.
Limit vehicles by amount of coal mined (steam locomotives) and delivered and or amount of power stations (electric locomotives),
as well as oil and refineries (road vehicles)?
Improve YAPF to take waypoints and line ends into account for routes, so it will for instance use a siding to reverse direction into a depot.
Diagonal roads?
---
Complete src directory to replace the 12.2 src directory of the official release: .
Linux package: .
No Windows build because it seems cross compiling no longer works.