O'Reilly logo

Swift 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 8. 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, so we'll add that to Cube Runner as well.

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

Making it 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, the usual juiciness 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