This site requires JavaScript, please enable it in your browser!
Greenfoot back
Gormatrax
Gormatrax wrote ...

2017/2/7

How can I make a screen-shake effect?

Gormatrax Gormatrax

2017/2/7

#
I would like to make the screen shake whenever the player receives damage or there is an explosion. By shake I mean a tremor-like effect(the whole image shakes a little bit.) How could I achieve something like this?
danpost danpost

2017/2/7

#
The code that you would use to make the screen shake is basically the same as what you would use to make the world a scrolling world. The only differences are (1) the scrolling is limited to very short distances (vertically and/or horizontally); (2) what condition(s) are used for scrolling; and (3) the behavior of the scrolling. The third difference is really a result of the second one. Shaking the world is now included in my Scrolling Tutorial scenario and is demonstrated in my Scroller Class Demos scenario.
You need to login to post a reply.