A stage for a bird

Let's kick-start the game by implementing the background, which is not as straightforward as it might sound.

SpriteKit in a nutshell

SpriteKit is a powerful but easy-to-use game framework introduced in iOS 7.

Basically, it provides the infrastructure to move images onto the screen and interact with them.

It also provides a physics engine (based on Box2D), a particles engine, and basic sound playback support, making it particularly suitable for casual games.

The content of the game is drawn inside SKView, which is a particular kind of UIView, so it can be placed inside a normal hierarchy of UIViews.

The content of the game is organized into scenes, represented by subclasses of SKScene. Different parts of the game, such as the menu, ...

Get Swift 2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.