How to make the screen shake with each step?

Started by DDWingate, Thu 24/10/2013 08:49:59

Previous topic - Next topic

DDWingate

I am making a game where you play as King Kong, and I wanted the ground to shake with each step. I understand there's a screen shake function. How could you cause this to function only with movement? Even better, with each new step, or (view). I have roughly 4 - 6 views for each perspective (up, down, left, right), and if the screen could shake with each new view, it would produce a brilliant, stomping Kong effect. Has anyone got a solution?

Much appreciated

Slasher

Hi,

quicky,

one way:

you could do an 'if' player View is this, player loop is this, player frame is this and then have it run the ShakeScreen from that.

Of course you could just make it only 'if' player View or Loop etc etc

If you can't code that please ask for help.

Hope this helps.

Another ways guys (nod)




Ghost

#2
The problem I see is, ShakeScreen is a *blocking* function, meaning, it stops the game for as long as it is running, and this will mess up a walkcycle-bound approach.
There is ShakeScreenBackground, which is non-blocking, though.

But seriously, while the idea sounds nice it's also very gimmicky. A screenshake affects the whole screen, GUIs included; I think it will stop being "cool" very quickly. Sometimes less is more- reserve the screen shakes for a few situations where Kong is really angry/kicking Godzilla/tearing down a building, and it will be much more satisfying.

CaptainD

I have no programming skills whatsoever so this is simply an idea, I couldn't even guess at how to implement it...

What if you have a background screen bigger then the visible screen, and on each step you execute a command to change the viewport to simulate a screen shake?

Adeel

Nice idea, captain. :)

IIRC, the donkey kong game on nintendo emulator shook the whole screen including the GUIs. So, using ShakeScreenBackground is best for this purpose. Again, we don't want to make the effect wear off.

The workaround to that problem would be to shake the screen with tiny strength for a little time after every two to three walking frames. :) 

Slasher

I suppose you could always add some off-set extra backgrounds and run in as an animation (background animate) for a second or 2 that would look like a 'Shake'.... Possibly....


SMF spam blocked by CleanTalk