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.
Fig. 6.1 | Completed Cannon game app.
The game begins with a 10-second time limit. Each time you destroy ...
No credit card required