Daily progression — Creating parallax in a 2D game
Currently in our project, we’re given a level with an orthographic camera. The level is beautiful! Kudos to the artist who designed it. One thing though is if you move the camera back and forth, it’s kind of flat.
The level is designed with various layers of tilemaps like the one we created in the past few days. One thing we can do to give it more depth is to change the camera to perspective.
Already with that change, one can see a little bit of parallax movement giving the area more depth, but we can enhance it by changing the z location of the tilemaps.
Let’s give the ground map a z location of 0, the background of 1, and the farground of 3.
Now there is some incredible sense of depth to the environment! I’ll be using this technique for sure in my own games very soon!