Skip to content

Save/load and demonstration: persistent game state and complete walkthrough - #3

Merged
WilliamRagstad merged 2 commits into
codex/adventure-runtimefrom
codex/save-load-demo
Oct 25, 2026
Merged

WilliamRagstad merged 2 commits into
codex/adventure-runtimefrom
codex/save-load-demo

Conversation

@WilliamRagstad

Copy link
Copy Markdown
Member

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 the safe_harbor ending.
  • Native smoke check under Xvfb/Mesa Vulkan: mouse pickup/dialogue, keyboard navigation, blocked puzzle actions, F5/F9 and mouse Save/New/Load, item consumption, ending restoration, and the 960×760 minimum window.

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.

@WilliamRagstad
WilliamRagstad marked this pull request as ready for review October 25, 2026 17:23
@WilliamRagstad
WilliamRagstad merged commit 50ac909 into codex/adventure-runtime Oct 25, 2026
3 checks passed
@WilliamRagstad
WilliamRagstad deleted the codex/save-load-demo branch October 25, 2026 17:23
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