Parallax scrolling |
Top Previous Next |
This month we get to play with a full 2D game that uses parallax scrolling.
Parallax scrolling is a pseudo-3D technique where the background images move together with the camera, slower than the foreground images, creating the illusion of depth and making the game look more realistic. My game consists of 4 layers:
1) The background.
2) The mountains.
3) The vegetation.
4) The foreground.
All of these are in fact different panels that move at different speeds and have different layers. I have decided to add a player and an enemy as well; the enemy will fire bombs and the player will have to avoid them in order to get a big score. Whenever the player is hit, its score is decreased.
The code is fully commented, so you can start creating your own 2D game the right way and right away.
|