Request for review / play testing - new savegame format#168
Request for review / play testing - new savegame format#168nthykier merged 7 commits intosingularity:masterfrom
Conversation
|
@sunfall I have not forgotten your idea of using an internal stable "savegame only" ID for everything. However, I would like some initial testing on this approach before investing time on that (to avoid "perfect being the enemy of good"). |
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
7 similar comments
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.64% 30.53% -0.11%
==========================================
Files 35 35
Lines 4866 4949 +83
==========================================
+ Hits 1491 1511 +20
- Misses 3375 3438 +63
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #168 +/- ##
==========================================
- Coverage 30.69% 30.64% -0.05%
==========================================
Files 35 35
Lines 4920 4986 +66
==========================================
+ Hits 1510 1528 +18
- Misses 3410 3458 +48
Continue to review full report at Codecov.
|
|
Added gzip'ed files. Load transparently handles either - save defaults to gzipped files except in debug mode where it uses the raw json instead. The JSON can be extracted from a savegame with the following Linux shell pipeline: tail -n1 $SAVEGAME_FILE_GOES_HERE | base64 -d | gzip -dc Example: tail -n1 ~/.local/share/singularity/saves/save-test-1-gzip.s2 | base64 -d | gzip -dc |
2cb2ede to
1e665c9
Compare
17f5b14 to
e143dc4
Compare
Signed-off-by: Niels Thykier <[email protected]>
This enables us to skip oneshot effects and event dialogs when loading save games. Signed-off-by: Niels Thykier <[email protected]>
Signed-off-by: Niels Thykier <[email protected]>
9e4e86f to
e1deb4e
Compare
Closes: singularity#52 Closes: singularity#56 Signed-off-by: Niels Thykier <[email protected]>
Load transparently handles gzip'ed and gunzip'ed files (because it was trivial to do). Save by default uses gzip'ed files unless the game runs in debug mode. Closes: singularity#145 Signed-off-by: Niels Thykier <[email protected]>
Signed-off-by: Niels Thykier <[email protected]>
Instead of using the pickled objects, we instead message them into a format similar to that of the JSON path and use the new style loading. This enables to restore savegame compatibility with many old savegame formats (including 0.30c). Closes: singularity#122 Signed-off-by: Niels Thykier <[email protected]>
e1deb4e to
d302fc3
Compare
I have taken a serious go at #145 and would like feed back on it before merging it into master.
The branch here provides a fully functional savegame format on a JSON-based file (with a custom header - both in-game time and difficulty is listed in the metadata). In the branch, the game will save both an old-style and a new style savegame file (to enable comparison/testing). The format only stores the essential data and recomputes everything else from scratch. As JSON only works with unicode strings, everything loaded from the game is pure unicode (note, some fields in.
Based on #145, there are the following known omissions:
Add Location, Event and Tech list to Player: Was not required to complete the rewrite, so I punted it. It can still be done after the merge of this branch.New format: String + Json with GZIP: At the moment, the game is not GZip'ed. I opted for omitting this during the review as it makes it much easier to debug the savegame without having to fiddle with gzip tooling. I will add it before merge.