Spielerando

The treasure is one square away from where the map says and the hero walks upside down

Maps from a drawing program, a spreadsheet and the game itself count squares differently: from zero or from one, from the top or from the bottom, and from the corner or the middle. Your AI can convert between them and avoid the classic mistake with negative positions.

Why this works

Every one-square error comes from mixing two ways of counting. Putting each conversion into one named step, and testing it with negative and border values, keeps the mixing in one place where it can be checked.

When not to use it

If the whole game uses one tool and one way of counting, there is nothing to convert. Pick that and keep it, rather than adding converters.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 22 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 "The treasure is one square away from where the map says and the hero walks upside down" (read_entry rpg-treasure-one-tile-off) 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