Wouldn't that be great to have a save file just a few ticks before the game crushed because of mod error?
This seems counterintuitive... How could we "undo" last few ticks to restore all the game state to that point in time where the game was still be playable.
This might seem hard to implement, but **I have a story for you**:
I play Factorio 2 Space Age with my son on LAN, and it's modded play.
We often install/update mods.
And here is what I noticed:
-When a mod crushes the game on my PC...
-A dialog with lua error appears on my PC and all I can do - just close the game and depend on autosave feature, thus having to rebuild last 5-15 minutes of our play
-BUT on my sons computer a "Disconnected from server" dialog appears
-Which have "Save game" button
I was thinking how could that be possible?
Well, the reason is obvious if you read all FFF: because of how Factorio's multiplayer game is organized.
Factorio sends only user actions to the other PC and then recalculates everything ther.
My LAN is 1 Gigabit, so the latency is very low, but still it's about 3-4 ms.
This time is just enough for the game to be crushed on my PC,
BUT the very last action won't be sent to my son's PC, because of the crush.
So here is why he have "Save game" button that have state **exactly** before the crush.
Well this is NOT just a fun story...
Imagine you can capture the difference between action stream on his PC and my PC.
**Now you can percisly reproduce the bug!**
Also we already have **replay** feature - so the game really knows how to save.
Now as Factorio Space Age is out a lot of big mods outhere is outdated... There would be a lot of bugs in them and this two features (1. save few seconds/ticks before the crush, 2. ability to replay last few ticks by modder) seem to be quite useful.
Here is how I see it:
- The game should store the same stream as "replay" does. But don't save it to disk
- Truncate the stream each time the game is saved
- When game crushes it should look for last save on PC
- Now the game needs to make special "crush save"
- This special save is just a copy from that last save, but with added journal from "replay" (from the point of save to the point of crush).
- When the game loads "crush save" ask user at which point in time he want's to load.
All this approach seem to be very native to databases (google "ms sql tail log backup")...
Crushsave - autosave just before crush & how to exactly reproduce mod bugs
Moderator: ickputzdirwech
-
- Fast Inserter
- Posts: 153
- Joined: Fri Jan 06, 2017 1:54 am
- Contact:
-
- Fast Inserter
- Posts: 153
- Joined: Fri Jan 06, 2017 1:54 am
- Contact:
Re: Crushsave - autosave just before crush & how to exactly reproduce mod bugs
40 views, no replies... pity... 
