O'Reilly logo

Swift 2 By Example by Giordano Scalzo

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

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, ...

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