Clicking the minimap sends the camera to the wrong spot on my wide map
A minimap that works on a square map often fails the moment the world is wider than it is tall. This entry gives your AI the conversion in both directions, with the empty bands around the picture handled so clicks there do nothing odd.
Why this works
One scale for both directions keeps proportions true; two scales stretch the picture. The smaller of the two fits the whole world, and the leftover space becomes bands that have to be subtracted before converting.
When not to use it
Skip it if your minimap is stretched on purpose to fill a fixed box and your art accepts the distortion. Then two scales are correct, but players will misjudge distances.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 30 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 "Clicking the minimap sends the camera to the wrong spot on my wide map" (read_entry strategy-minimap-click-goes-to-wrong-place) 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