O'Reilly logo

iOS® 8 for Programmers: An App-Driven Approach with Swift™, Third Edition by Abbey Deitel, Harvey M. Deitel, Paul J. Deitel

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

6.1 Introduction

This chapter introduces SpriteKit—one of iOS’s powerful game-development frameworks. You’ll use SpriteKit to build the Cannon game app—a landscape-only universal app that challenges you to destroy nine targets before time expires (Fig. 6.1). The game consists of several visual components—a cannon, a cannonball, the targets and a blocker that defends the targets. You aim and fire the cannon by touching the screen—the cannon then rotates to face the touched point and fires the cannonball in a straight line in that direction.

Image

Fig. 6.1 | Completed Cannon game app.

The game begins with a 10-second time limit. Each time you destroy ...

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