A far explosion shakes my screen as hard as one at my feet, and clicks go astray
In a game where you look at a large battlefield, a shake that ignores where the blast was is confusing, and a shake that moves the picture also moves what the mouse points at. Here is how the strength depends on distance and zoom, how it dies down, and what must not shake.
Why this works
A blast that is far away should be felt less than one close by, and small hits should be gentle while big ones are rare and loud. A single running amount that is fed by blasts, drains away over time and is squared when shown does all three.
When not to use it
Turn it down or off for players who feel ill from shaking, and where the player must click precisely at once, such as in a fast duel. Offer a strength slider, and show impact with a flash or a sound instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 35 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 "A far explosion shakes my screen as hard as one at my feet, and clicks go astray" (read_entry strategy-explosion-shake-by-distance) 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