Spielerando

Check that every door puts you where you expect and leads back

Walk through the cellar door and arrive inside a wall, or step out of the inn and land at a different door of the village, or ping-pong between two rooms forever. Here is a check of all doors at once that finds these before the player does.

Why this works

A door is a promise made in two places. Checking every door and its partner together, including the spot where the player lands, catches broken promises in one sweep, long before anyone walks into a wall.

When not to use it

Skip the back-link check for doors that are meant to be one-way, such as a trapdoor or a teleporter that sends you somewhere new. Mark those on purpose and still check the landing spot; and for a world made on the fly, check as it is made.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Check that every door puts you where you expect and leads back" (read_entry doors-that-lead-back-to-the-same-spot) 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