Chapter 15 Adding More Scenes and Saving the Game

Apple Game Frameworks and Technologies — by Tammy Coron (139 / 193)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Next Steps | TOC | Add New Scenes 👉

Using a single game scene is not uncommon, especially for smaller games like Gloop Drop, the game you built in Part 1, Build Your First Game with SpriteKit. With a single scene, game developers can place all of the game content and supporting methods in a handful of classes, so that when the first (and only) game scene loads, the player can tap the screen (or maybe a certain button) to start the game.

There’s nothing wrong with using a single scene for your game, but when you’re working on larger games, such as Val’s Revenge, you’ll likely want to include multiple scenes like a title scene, a “game over” scene, and perhaps more than one game scene that represents a different level within your game.

However, as your game grows, so will the expectations of your players, such as the expectation of being able to save their progress. Imagine how frustrating it would be for players if every time they made a wrong choice, they had to start the game back at the beginning.

In this chapter, you’ll work on taking Val’s Revenge to the next level — quite literally — by adding new scenes and new levels to the game. You’ll also add a way for players to save and load their progress.

So, what are you waiting for? It’s time to get to work.

👈 Next Steps | TOC | Add New Scenes 👉

Apple Game Frameworks and Technologies by Tammy Coron can be purchased in other book formats directly from the Pragmatic Programmers. If you notice a code error or formatting mistake, please let us know here so that we can fix it.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.