Spielerando

After a map change the hero loads inside a wall or on an island they cannot leave

You move a wall or rebuild a room, and players who saved right there load into solid stone or into a pocket that is cut off from the rest. Here is how to find the nearest place that is both free and connected to the level, and why nearest alone is not enough.

Why this works

A spot is only good if the hero can also get out of it. Close by is not the same as reachable, because a wall can sit between. Asking where the player can walk from the entrance, and choosing within that, avoids trapping them in a pocket.

When not to use it

Do not move the hero on load in a game where odd positions are part of the play, such as one with deliberate secret spots or free flying. Moving them would break what the level designer meant. Check only the levels that changed.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 4 common mistakes and the fix
  • 36 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 "After a map change the hero loads inside a wall or on an island they cannot leave" (read_entry rpg-hero-loads-inside-a-wall) 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