Skip to content

Make loading savegames deterministic - #1970

Draft
Flamefire wants to merge 3 commits into
masterfrom
save-rng-state
Draft

Flamefire wants to merge 3 commits into
masterfrom
save-rng-state

Conversation

@Flamefire

Copy link
Copy Markdown
Member

Currently the RNGs for in savegames are seeded with zero. This means continuing a loaded savegame will be different than the game played at that point.

Implement saving the current RNG states.

@Flamefire
Flamefire force-pushed the save-rng-state branch 5 times, most recently from 1814e44 to 4b87096 Compare August 26, 2026 13:07
After C++11 the outcome is specified by the standard for the standard
PRNGs. Hence we can use a generic function for serialization.
Add those and tests.
The standard RNGs serialization is not platform/compiler independent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant