O'Reilly logo

Learning Swift: Building an iOS Game by Jocelyn Harrigton, Christoffer Hallas, Clayton McIlrath, Paul Nettle, Ankur Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Level select scene

Pencil Adventure is a big place so we need several different scenes to take us through the story of our hero Steve. To allow our player to see what levels exists, and what levels have been completed, and to select a level to play, we must create a level select scene.

You can read the full source code of our Pencil Adventure game here on Github.

In this chapter you will learn how to use Swift to programmatically create a scene, instead of using the scene editor in Xcode. This is useful for smaller, dynamic scenes that are not part of the actual game play. We will also deal with how to create a load progress indicator, which is useful to improve the user experience of the level select scene.

We will cover the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required