Screen Shake

Screen shake effects are great to increase the visual impact of events.

To increase the visual “impact” of various in-game events in Nicely Dicely (e.g. the explosion of a mine) and thus make the game feel more dynamic, an adjustable screen shake system was added to the NDMainCamera component.

The effect is based on simultaneous sine and cosine animations of the three dimensions of the camera’s position. In the NDMainCamera component one can configure the general strength and frequency of the effect animation (see pink highlight in the image). Although adding more would be easy, for Nicely Dicely it was enough to add three screen shake templates. These were preconfigured starting in strength from a light BLIP over a stronger PONG to a rather pronounced BOOOM. Each template is set up with different values for effect duration, strength multiplier and vibration intensity (see light blue highlight). The latter affects how the system also triggers haptic feedback through gamepad vibrations. Finally, there is also a short delay implemented, which runs between triggering a screen shake and before the effect actually begins. This should subtly simulate the travel time of a shock wave and thus improve the feeling of the effect.