20 · Combat · 2D and 3D

Screen shake

Shake the camera to sell impacts, without making people sick.

A small camera shake on big hits and explosions adds punch nothing else can. Done badly, with random jumps every frame that stop abruptly, it looks like a glitch. Good shake uses a "trauma" value that each impact raises and that decays smoothly, with the shake strength rising as trauma squared, and smooth noise instead of pure randomness.

Space small hitB big hit123 smooth / random / offTap for a hit, double tap for a big one

Try this: Spam small hits in Random mode, then in Smooth mode. Small hits barely shake on Smooth; big ones still land hard.

Hit the slime.

Prompt bit

Works for 2D or 3D in any engine (Unity, Unreal, Godot, web). Paste the short one for a quick fix, or the detailed one when you want it done properly.

Add trauma-based screen shake: each impact adds 0.2 to 1 trauma (capped at 1), trauma decays to zero within about 0.7 s, offset and tilt use trauma squared times smooth noise, and offer an accessibility setting to reduce or disable it.

41 words · one sentence to paste as is

Where it's used

Common mistakes

A new random offset every frame (looks like a glitch), moving the main camera position so the shake accumulates and drifts, shaking on every small event until players feel sick, and no option to turn it off.

Writing this with an AI assistant? See our best AI coding assistants for game developers.

Missing a concept? Request one.

Related concepts

New concepts, in your inbox.

One short email when we add new concepts, plus our weekly roundup of AI tools for game devs. Unsubscribe any time.