Find the door where using a single-use key leaves the level unfinishable
Two locked doors, one key. One door leads on, the other leads to an empty closet. If the player picks the closet, the level cannot be finished and nothing tells them. Here is how to list every choice that traps a player, before they make it.
Why this works
When a key is used up, a choice cannot be undone, so the order of choices matters more than the layout. Trying each choice and asking whether the exit can still be reached shows which opening leaves the player with nothing.
When not to use it
It is too slow for a huge level with many locked doors, and unnecessary where keys are never used up. There, make keys permanent or give a spare key, instead of checking.
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
- 46 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 "Find the door where using a single-use key leaves the level unfinishable" (read_entry key-used-on-wrong-door-strands-the-player) 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