Spielerando

Bring crafted items into a level and get the unused ones back after a crash

The player packs five bombs for a stage and the game closes halfway, because the phone died. When they come back the five bombs are gone from the bag and the level is not finished. This entry keeps a small note so unused items return exactly once, however often the game restarts.

Why this works

Whatever a player lends to a level must be written down before the level begins, otherwise a crash decides the outcome. A single note of what went in and what was used lets the game settle the account afterwards, and clearing it in the same step makes a repeat harmless.

When not to use it

Do not refund after a crash in a game where the level is meant to be a one-way bet, like a hardcore run where leaving early counts as losing. Then spend the items at the door and say so before the player enters.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 31 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Bring crafted items into a level and get the unused ones back after a crash" (read_entry level-loadout-survives-a-crash) 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