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 4. Platform games

You have learned some Sprite Kit basics along with some Swift concepts. Let’s start adding more realistic physics behavior to our Pencil Adventure game! This chapter will cover the following basic elements that are crucial when creating our platform game:

  • Physics world
  • Physics bodies
  • Tap to jump 

The building blocks

The goal of this chapter is to cover what’s available in the Sprite Kit physics engine so you can add these essential building blocks to our Pencil Adventure game. At the end of this chapter, you will have learned how to make Mr. Steve run and jump in Pencil Adventure. 

There are many legendary iOS platform games. Sonic, Mega Run and Flappy Bird are just a few names that I’m sure you recognize. 

Fun ...

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