Spielerando

Turning the slanted map view by a quarter makes everything jump to another place

To let players look behind a tall building you turn the whole map view, but the spot they were looking at flies off the screen and clicks land on the wrong tile. Here is how to turn the map itself around its middle, keep the view where it was, and turn clicks back.

Why this works

The map is the truth and the picture is only a way of looking at it. If you turn the coordinates and leave the data alone, drawing and clicking share one rule, and anything stored in map terms keeps pointing at the same ground after every turn.

When not to use it

It is the wrong tool when the world is not a square grid, or when people may turn the view by any angle. Then use a real rotation of the whole scene with a free angle instead of quarter steps.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 40 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 "Turning the slanted map view by a quarter makes everything jump to another place" (read_entry strategy-rotate-slanted-view-quarter-turn) 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