LordNokon wrote:This might sound naive... But I'm not a programmer so I really wouldn't know.
But how hard would it be recoding a game of 4mb-12mb against any new games sizing 7GB-18GB to be able to using maximum resource available
Of those huge games, about 7-18GB is graphics, videos and sounds. I would reckon the actual amount of logic is less than the amount of logic in OpenTTD.
Take a first person shooter. What kinds of calculations do you have? Some updating of the location of the actors, possibly some AIs running around, some handling of shooting/flying objects, and finally a lot of fancy 3D drawing, lighting and effects. So... you have a game state of maybe a few hundred variables? You just clone the game state and then let AIs do their thing and update the locating the next cycle, you update the game state for the changes the players caused and flying objects, and then you pass that to the drawing engine. The last will take most time, however you can split up most calculations by just dividing the area that needs to be drawn into <number-of-cores> different sections and let them be drawn concurrently.
Now OpenTTD. What kinds of calculations do you have? Lots and lots of vehicles moving, including pathfinding (imaging trying to find a route to your holiday location and all you can see are pieces of the map in 100 by 100 meter), AIs doing pathfinding calculations, cargo being moved around, signals being updates. This game state has thousands, tens of thousands and maybe even a hundred thousand variables. Thus copying the game state is too expensive; often you can notice when an autosave happens because the game momentarily freezes. The time of that freeze is the time needed to just copy the game state.
Now you would say, oh well, just let the vehicles do all their expensive stuff concurrently. However, what happens if two vehicles are nearing the same signal block at the same time. In multiplayer this causes problems if player A gets train 1 there first, and thus passing into the signal block, when player 2 gets train 2 there first (different scheduling by the OS or something); then the game states are out-of-sync. Okay, lets split it on vehicle type; same problem with level road crossings, and at stations. What if for player A a road vehicle loads the cargo instead of the train that does it for player B. Similarly with a vehicle unloading before another vehicle loads or vice versa. This basically means that all vehicle/cargo logic needs to be run sequentially. If you add all these dependencies there is very little that you can split in the game logic; basically everything is depending on vehicles/cargos in some way. Tree growth -> lumber mill -> cargo production, flooding -> station (part) flooding -> cargo movement, disasters -> vehicle destruction, town growth -> cargo production.
The things that can be split off are usually not game logic related; actually drawing, although the determination of what to draw must be in sequence with the game logic due to the time needed to clone the game state, music playback, savegame compression, sound playback. Interestingly all these things that can be 'easily' done in a separate thread are already done in a separate thread.
If you want to split things in the game logic, then massive changes need to be made regarding the moving around of cargo and only then there might be some ways to split the game logic in independent threads. However, that would mean delaying cargo handling/moving/payment by a tick.