Repository navigation
Save/load and demonstration: persistent game state and complete walkthrough - #3
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Preserve the current room, inventory, flags, one-shot hotspots, active dialogue node, dialogue history and ending across save/load. A player can save during the keeper's instructions, start a fresh game, reload and finish the adventure without losing progress.
Saves use a versioned JSON envelope and a SHA-256 scene fingerprint. Loading validates references and state consistency before replacing live state. Saving syncs a temporary file and atomically replaces the slot. Incompatible or corrupt saves report field/path diagnostics and leave the running game unchanged. Scene content changes intentionally invalidate v1 saves; migrations are not implemented.
Adds F5/F9 and mouse save/load controls, an interactive terminal player, a self-checking walkthrough with three disk checkpoints, save-format documentation, a captured transcript and native screenshots in
docs/walkthrough.md.Validation:
cargo test --locked: all 18 tests passed, including fresh-instance restoration after every gameplay step and invalid-save/I/O cases.cargo clippy --locked --all-targets --all-features -- -D warnings, formatting, and the native desktop build passed.cargo run --locked --example console -- --walkthrough: reached and restored thesafe_harborending.Play:
cargo run --locked --features desktop --example last_light.Third of three stacked changes; depends on #2 (which depends on #1) and targets its branch. Retarget to main after the preceding changes merge. Fixture assets are original CC0 content with Bevy font attribution.