Screen shake
Makes hits and explosions feel heavy by shaking the picture. Hits add up and fade away by themselves, and the movement is a smooth wobble, so it shakes instead of flickering.
When you need it
For anything with weight: a heavy landing, a sword hit, an explosion, a boss stomping. Give players a setting to turn it down, because some get sick from shaking screens.
Say this to your AI
Use the screen shake from Spielerando so explosions kick hard, small hits only nudge, and players can turn it off in the settings.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP
Settings
- maxOffset (16): The most the picture moves, in pixels, on the biggest shake.
- maxAngle (0.05): The most the picture turns, in radians. A small turn adds a lot of weight.
- decayPerSecond (1.2): How quickly a shake fades. Higher is short and punchy.
- speed (18): How fast the picture wobbles. Lower feels heavy and slow, higher feels like a rattle.
- strength (1): A setting for the player: 1 is full, 0 is off.
Your AI gets the code
The finished code and math come through the Spielerando connection, so your AI can use them right away. Connect your AI
Common questions
how do i add screen shake to my game
Keep one number for how shaken the screen is. Each hit adds to it, and it fades over time. Every frame, move the picture by a smooth wobble that is as strong as that number squared.
why does my screen shake look bad
Pure random jumps flicker, and shakes that grow in a straight line make small hits too strong. A smooth wobble with a squared strength fixes both.
can screen shake make players feel sick
Yes, some players do not cope with it. A strength setting takes one line here, so a player can turn it down or off.