Chapter    27

Finishing the Tick Tick Game

In this chapter, you will finish the Tick Tick game. First, you will add a timer so that the player has a limited amount of time to complete each level. Then, you will add a few mountains and clouds to the background to make the game visually more interesting. Finally, you will write the code that allows the player to progress through the level.

Adding a Timer

Let’s first look at adding a timer to the game. You don’t want the timer to take up too much screen space, so you use a text version of it. The Timer class inherits from the SKNode class, and it contains a background frame as well as a label node showing the remaining time. You want to be able to pause the timer (for example, when the level is ...

Get Swift Game Programming for Absolute Beginners 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.