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 5. Adding more platform features

In the last chapter you learned the basics about applying the physics simulation in Sprite Kit. This chapter will continue by adding the following crucial elements to Pencil Adventure:

  • Power up and platform features
  • Scrolling
  • Collisions and contacts
  • Game end

And along the way you will learn about the following Swift elements:

  • Private functions
  • Downcasting with optional forms
  • Bitwise Shift AND OR operations

Continuing from the last chapter, Steve and the ground exist in the game scene, but let’s continue by adding a few more objects to the game scene so Steve can jump forward.

Power up and platform features

When you play the Pencil Adventure game from the App store (we are in the process of publishing ...

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