• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Exclude Background Layers from Screenshakes

JeanSwamp

Member
Hey!

I'm tweaking aroud my screenshake, and basically it just adds a random range to x and y to the camera. This causes a nice looking screenshake, however, it also does move the parallax backgrounds, which I do not want like. If the screen shakes, it wouldn't make sense to have mountains so far away also shaking, and the smoother the screenshake the more you notice this looks weird.

How do you guys apporach this?
 

Slyddar

Member
Not a solution, but how I approach it...What are you imagining is shaking when the game is running? The reason everything usually shakes is we look at the game from our perspective, and we imagine ourselves are shaken when we apply a screenshake. If that's the case, the mountains will also 'appear' to move as our body/head/eyes are moving.

If it's really what you want, one way is whatever the offset to the shake is, you pass the x and y movement to the background and a counter move is applied to offset it. Not sure how smooth it would be though.
 
Last edited:

Miradur

Member
Hi, I would use a surface for this and copy the background onto it before the shake effect starts. Because of the shaking, it's unlikely that the background stays the same.
For the surface, you simply slide a layer against the background, where you then display the still image.


Miradur
 
Top