Chapter    8

Selecting and Unlocking Levels

For this game, you will want to give users a way to select which level they want to start with. Since the levels are separated into different worlds, you’ll use a Scroll View node to allow the user to swipe between worlds.

In addition, you’ll want a flexible way to add more levels while keeping track of which levels the player has already unlocked. The GameState class will help in that area.

Of course, you’ll have to add additional-level CCB files. You’ll be adding several dummy levels that you can then update with your own graphics and actual gameplay as you please. You’ll even learn how to count the level files currently in the app.

Moreover, and this completes the various menus, you’ll add a level-completion ...

Get Learn SpriteBuilder for iOS Game Development 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.