Jump to content

Save Game Alternate Thread | Background Worker

Recommended Posts

I would suggest the game use methods that do not freeze the game when saving if possible.  Alternate threading, background process etc.   Maybe something that takes a very quick snapshot within a second or two and uses that quick snapshot to save and allocate data while allowing the game to continue forward.  The game stops for a short time every cycle and by 800+ cycles that lost time adds up to significant number.  The saves also become more obvious as the length to save has now become noticeable and the lockup/freeze is apparent to the end user enough to be annoying.  I can only imagine by cycle 2000 or 3000 this could be an even bigger hang time.  Just my suggestion.

Link to comment
Share on other sites

Lets assume this game saving thread would need 5 seconds to save the game.

If I understand correctly, you would like the game to run during this 5 seconds. Duplicants run across the map, liquids move in the pipes, gases float in your base, everything changes. Since the game is not stopped, your save file would gather some data from time T+0s, some from T+2s and some from T+5s. So what would happen after you load such save file...?

Absolute mess...

You could duplicate some duplicants because they moved and were in another place at the end of save thread. You could duplicate moving gases. You could anihilate another objects. If you have 2 reservoirs connected, one could be would be saved at the beginning, when it had no liquid inside and the other later, when it moved its liquid to the 1st one. As the result, there would be no liquid in the save file in neither 1st nor 2nd.

The amount of chaos would be unimagineable, and bugfixing would be nearly impossible... 

The only way to prevent this is to pause the game for the time of saving it, but then you don't need the 2nd thread as 1st one is paused and doesn't do anything

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

  • Create New...