News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Different outcomes from server game online vs offline save

Started by AP, January 05, 2018, 08:03:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AP

I seem to have an odd situation where, from a save of the server game, if I fastforward offline, "different things happen" than do online.


Specifically, I have built a single track railway, and I thought "if i start a train from each end simaltaneously, and put a loop at the point where they meet (in the exact middle), with one way signs on it, they will keep passing each other forever without signalling".


So I watched it happen offline, found the right spot dead central, fastforwarded to test it worked reliably, then went online and built it exactly the same, and started the trains off. But coming back to the server today, the trains have deadlocked somewhere else (not in the middle of the route).


Why could that be? 

jamespetts

I am afraid that it is impossible for me to understand what has happened without much more information. We do not even know the point at which they deadlocked, nor whether that is the same point in time as that to which you tested it when fast-forwarding, and therefore whether there is any difference at all.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

AP

That's as I thought. If I get any clues I'll report back.

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

Single player uses a different time progression model than multiplayer. Not only does it generally run at a higher frame rate (smaller sync step duration) but it also varies the duration of sync steps to maintain a stable frame rate. When fast forwarding it specifically uses extremely long sync steps for better computation efficiency and hence a feeling of faster speed. Generally fast forward can be considered as sacrificing accuracy for speed.

Additionally Simutrans is not save/load state consistent. A save/load cycle will produce a different game state which will have different results when compared with continuing after the save. This is why the multiplayer server and all connected clients must save/load cycle every time someone joins as that is the only way for everyone to have a consistent game state.

The reason Simutrans does this is to reduce save complexity and hence keep save files smaller. If save/load cycling did have full state consistency then clients could near seamlessly join servers and other clients would not have to reload each time.