Spielerando

Zooming with the mouse wheel should zoom into the point you point at

A map or editor that zooms around its centre makes the thing you wanted to see slide away. Players expect the spot under the pointer to stay where it is. Getting this exact needs one small adjustment of the camera, and the steps of the wheel must multiply instead of add.

Why this works

People point at what they want to see, and expect it to stay put. Holding the world point under the pointer fixed while the scale changes matches that, and growing the zoom by a share each time makes every notch feel alike.

When not to use it

Skip it when zoom is meant to be a fixed set of levels around the player, as in a game where the figure must stay centred, or on touch screens where a pinch already carries its own centre. Zoom around the centre there.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 28 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 "Zooming with the mouse wheel should zoom into the point you point at" (read_entry zoom-toward-the-cursor-position) 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