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

Chapter 9. Completing Cube Runner

In the previous chapter, we implemented most of the features of Cube Runner. In this chapter, we will finish implementing the game.

The most notable feature that is missing is collision detection, so we'll start with that in this chapter. As we have already said, when we built Flappy Swift, Game Center support made the game more interesting; thus, we'll add that to Cube Runner as well.

Let's get started with all of this, and much more, in this chapter.

Creating a real game

The first thing we must implement to make this a real game is collision detection. Then, we'll add an end to the game; otherwise, it will be really boring. Finally, a few extra touches will make the game more appealing.

Detecting collisions

Collision ...

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