Make the back button restore the story and keep dice results
A rewind button that only moves the text back leaves points and flags from the undone choice behind, and one that also replays dice lets the player reroll until it works. Here is how to rewind honestly, with a limited history and fixed outcomes.
Why this works
Going back is only trustworthy if it returns the whole world, so each step keeps a real copy of the position and everything that was counted. Dice are the exception: if they changed, going back would become a way to shop for a better outcome.
When not to use it
Wrong when the story is about irreversible choices, such as a permadeath game or a narrative whose weight comes from not being able to undo. Leave out the back button, or limit it to the dialogue just read.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 27 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make the back button restore the story and keep dice results" (read_entry rollback-must-restore-variables-and-dice) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP