Chapter    4

Adding Scene Scrolling and Game Control

In the previous chapter I discussed Sprite Kit’s physics engine and collision detection. I started with a discussion of SKPhysicsBody. You then turned on the game world’s gravity and added a touch responder to propel the playerNode up into space. Finally, I closed out the chapter with a discussion of how to handle collisions.

In this chapter, you will start adding some real functionality to your game. You are going to begin by making some small changes to the current GameScene. After that, you will add additional orb nodes to collide into. You will then add scrolling to your scene, allowing you to make it look like the player is flying through space collecting orbs. And finally, you will start ...

Get Beginning Swift Games Development for iOS 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.