Part    IV

Penguin Pairs

In this part of the book, you will develop the game Penguin Pairs (see Figure IV-1). I will introduce a few new techniques for programming games, such as game objects in a grid layout, file I/O, better game-state management, storing game data between playing sessions, and more.

Penguin Pairs is a puzzle game, the goal of which is to make pairs of penguins of the same color. The player can move the penguins by clicking or tapping them and selecting the direction in which the penguin should move. A penguin moves until it’s stopped by another character in the game (this can be a penguin, a seal, a shark, or an iceberg) or it drops from the playing field, in which case it falls into the water and is eaten by hungry sharks. ...

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.