Spielerando

Far from the map's center the buildings and units tremble and snap

On a very large map, things drawn far from the starting point start to jitter, and slow movements turn into little jumps, because the graphics card works with less precise numbers than the game does. Here is the cure: draw everything relative to the camera and move the zero point when the camera gets far from it.

Why this works

Numbers with a fixed number of digits are fine near zero and coarse far away, like a ruler whose marks spread out. Subtracting a nearby reference first, while the exact value is still known, keeps the small differences that the picture needs.

When not to use it

Leave it out for small worlds, where nothing ever gets far from the middle; the extra bookkeeping then only adds chances for mistakes. If the world is only big in one direction, simply keep the start of the map near zero.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 29 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 "Far from the map's center the buildings and units tremble and snap" (read_entry strategy-huge-map-jitter-origin-shift) 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