Shake the screen harder for big hits and stack small ones without going wild
Screen shake is easy to overdo: explosions in a row shake the picture off the screen, the shake looks like a blur on fast monitors, and it fades at a different speed on every computer. Here is how to stack, cap and fade it so it reads the same everywhere.
Why this works
Felt impact grows faster than the number behind it: a small bump should be barely there and a huge one should hurt. Storing a capped, fading build-up and showing only its square gives that curve, and stacking hits can never run away.
When not to use it
Turn it down or give players an off switch in calm or cozy games, and for anyone prone to motion sickness. Use a short flash, a sound or a small pause on the hit to show impact instead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 18 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 "Shake the screen harder for big hits and stack small ones without going wild" (read_entry screen-shake-from-stacking-hits-that-fades-evenly) 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