Spielerando

Check that every door on your map has a matching door on the other side

When rooms are added one at a time, it is easy to end up with a door you can walk through but never walk back through, or one that returns you to the wrong room. This entry shows how to check a whole map and still allow the one-way drops you want on purpose.

Why this works

A door is a promise that you can come back the way you went, and players expect it without thinking. Each exit therefore has a partner on the other side. Checking the pair, not just that the target exists, catches the worst case: a door that returns you to the wrong room.

When not to use it

Skip it for maps that are meant to confuse, such as mazes with one-way teleporters, or worlds where rooms are not joined by doors at all. Name the intended one-way exits one by one, or use a different check for open worlds.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 26 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 "Check that every door on your map has a matching door on the other side" (read_entry map-doors-must-lead-back) 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