Spielerando

Replaying a stage with a worse result takes away the stars the player already earned

Stage-based games hand out stars for how well a level went and use the total to open the next ones. The easy mistakes are overwriting good results with bad ones and counting a retry twice. Here is the bookkeeping that avoids both.

Why this works

Replaying should never cost anything, or the player stops trying. Keeping only the best result means every run is a free chance, and opening later parts by the total gives many ways to move on.

When not to use it

Skip star gates for a story-driven game where players should simply see what comes next. Forcing replays to move on feels like padding; open the path and offer stars as an optional extra.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 29 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 "Replaying a stage with a worse result takes away the stars the player already earned" (read_entry stage-stars-keep-best-and-unlock) 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