Chapter 15
Adding More Scenes and Saving the Game

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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset