Spielerando

Make "win three levels in a row" survive quitting, crashes and retries

If leaving a level mid-way costs nothing, a streak quest is trivial: quit whenever it looks bad. If a crash costs the streak, players are furious. Here is where to draw the line and the tiny state that makes both cases behave the same on every phone.

Why this works

A device that gets switched off cannot run any last words, so the game writes down that an attempt began before it starts, and judges the unfinished one at the next start. That treats quitting, crashing and retrying the same way on every phone.

When not to use it

Skip it in a relaxed game for young children or for players who are often interrupted by real life. A broken streak feels like a punishment there. Let a paused level simply resume, or forgive one lapse.

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
  • 22 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 "Make "win three levels in a row" survive quitting, crashes and retries" (read_entry win-in-a-row-quest-quit-counts-as-loss) 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