Spielerando

Hide keys in random rooms but never where the player cannot get to them yet

Putting keys at random in a generated level can lock the key to a door inside the very room that door guards. Build the level in the order the player will play it and the problem cannot arise. Here is the order, and what to do when the level cannot be finished.

Why this works

If you only ever hide a key where the player can already walk, every lock gets opened by something found earlier, so the level cannot trap anyone. Building the guarantee in as you go is exact and cheap, where placing at random and checking later wastes tries.

When not to use it

Wrong if you want secrets, loops back to earlier rooms, or keys the player must carry across the map by a hidden route. This makes levels always feel like a tidy chain. For variety, hide some extras by hand.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 5 common mistakes and the fix
  • A diagram of every state
  • 27 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 "Hide keys in random rooms but never where the player cannot get to them yet" (read_entry survival-place-keys-so-level-is-solvable) 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