Spielerando

Stop a respawn from handing out a story reward twice or never

A player grabs a story item, dies, and restarts at the last checkpoint. Sometimes the item is now in the bag twice, sometimes it is gone and the door never opens. Here is why the two halves of the saved game drift apart and how your AI proves they cannot.

Why this works

A saved game is one picture of the world at one moment. If the list of what has happened and the bag of what you own are put back at different times, they stop agreeing: one says the prize was given, the other says it was not. Putting both back together keeps them in step.

When not to use it

Skip it when keeping things on purpose is the design, such as a roguelike where some finds survive death, or money earned that should stay. Then say clearly which items live outside the checkpoint, and give those their own rules.

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
  • 39 lines of example code with 5 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Stop a respawn from handing out a story reward twice or never" (read_entry respawn-grants-story-reward-twice) 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