© James Goodwill and Wesley Matlock 2017

James Goodwill and Wesley Matlock, Beginning Swift Games Development for iOS, 10.1007/978-1-4842-2310-9_4

4. Adding Scene Scrolling and Game Control

James Goodwill and Wesley Matlock2

(1)Highlands Ranch, Colorado, USA

(2)Kansas City, Missouri, USA

In this chapter, you will start adding some real functionality to your game. You’ll 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. Finally, you will start using the phone’s accelerometer to move the player along the x-axis.

Reorganizing the GameScene

Before you move ...

Get Beginning Swift Games Development for iOS: Develop 2D and 3D games Using Apple's SceneKit and SpriteKit 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.