O'Reilly logo

iOS Game Programming Cookbook by Bhanu Birani, Chhavi Vaishnav

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Parallax background

Now our mini game FlyingSpaceship is about to finish. To give the feel of a game environment we will introduce a parallax scrolling background. A parallax scrolling background is composed of multiple background layers (that is, nodes); animating them simultaneously gives a feel of dynamic background. To add some cool flyers to the game we will add two layers of background: the SpaceBlueSky and the SpaceWhiteMist in the form of nodes.

Getting ready

To start with this cool feature, we should be aware of the scrolling background created in the previous chapter and have a basic knowledge of sprites, nodes, and math. We are going to cook the Parallax background recipe in the FlyingSpaceship game.

How to do it…

To create multiple scrolling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required