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

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.