Take your game ideas from paper to pixels using Sprite Kit, Apple’s 2D game development engine. Build two exciting games using Sprite Kit and learn real-world, workshop-tested insights about game design, including cognitive complexity, paper prototyping, and levels of fun. You’ll learn how to implement sophisticated game features such as obstacles and weapons, power-ups and variable difficulty, physics, sound, special effects, and both single- and two-finger control. In no time, you’ll be building your own thrilling iOS games.
Build iOS Games with Sprite Kit: Unleash Your Imagination in Two Dimensions
by Jonathan Penn and Josh Smith
What You Need: You need a computer running Mac OS X Mavericks and Xcode 5.
Printed in full color.
About This Title
Power up your inner game developer and start building incredible games with Sprite Kit. This book will teach you everything you need to know about Apple’s 2D game engine. If you have some programming experience but you’re new to game development, you’ll hit the ground running, no complex tools required—just the Sprite Kit SDK.
You’ll start out fast by building a single-finger infinite runner game, where the goal is to stay alive as long as possible and rack up points. You’ll explore the Sprite Kit template, actions, and particle editor and watch your game take shape with an armed player ship, asteroids and enemy ships, explosions, power-ups, and variable difficulty. Then you’ll stitch the game together with cutscenes, menus, and scoring.
Next, you’ll build a classic pinball game with all the fun and physics of the real thing. You’ll discover the powerful Sprite Kit physics engine and enhance your game with gravity, friction, ricochets, and spin physics, as well as sound effects, bonus scoring, and special effects. Plus, this game features two-finger control.
Dust off those game ideas you’ve been tucking away and let your imagination bring them to life. This book will show you how.
Read the reviews .
What You Need
You need a computer running Mac OS X Mavericks and Xcode 5.
Beginning iOS developers who want to write games and interactive applications.
Each of our books has its own dedicated discussion area, where readers help each other out. Many authors also choose to drop by.
Here are some recent topics:
Contents & Extracts
- How Do We Get There?
- The Road Ahead
- How To Get The Most Out of This Book
- Expectations and Technical Requirements
- Intro To Sprite Kit
- Setting up a Sprite Kit project
- Drawing Scenes And Sprite Nodes
- Following the Finger Around excerpt
- Making The Ship Glide
- Actions: Go, Sprite, Go!
- Shooting at Asteroids With Simple Motion Actions
- Moving Nodes on A Path
- Playing Sound Effects in the Scene excerpt
- Implementing Weapon Power-ups With Actions
- Explosions and Particle Effects
- Generating a Parallax Field of Stars
- Building Thruster Fire With Xcode’s Particle Editor
- Loading Particle Emitter Files
- Spewing Particles Briefly For Explosions
- Menus And Cutscenes
- Crafting a Basic Menu With UI Kit’s Interface Builder
- Showing the Star Field Underneath UI Kit
- Custom Scenes And Gesture Recognizers
- Building a Game-Ending Sequence
- Keeping Score with a Heads-Up Display
- Planning The Node Layout
- Aligning Label Nodes Within Groups
- Updating the Display
- Pulsing Power-up Countdowns For The Win
- Showing The High Score
- Pinball Physics 101
- Follow the Bouncing Ball excerpt
- Moving the Plunger With A Touch
- Using a Fixed Joint To Stick The Ball To The Plunger
- Building a Scrolling Table With an Edge Body
- More Physics: Paddles and Collisions
- Building Paddles With Bodies, Pins, and Torque
- Loading Targets And Bumpers From A Layout File
- Detecting Collisions Between Bodies
- Responding To Collisions
- Slowing Down The Ball On Rebound
- Polishing The Pinball Game
- Where To Go Next
Brought to You By
Jonathan Penn has written his own games in Sprite Kit and also uses the framework as a prototyping and demonstration tool due to its incredible flexibility. Josh Smith has worked in the gaming industry using various game engines, including Cocos2D, the game engine that Apple targets directly with Sprite Kit. Jonathan and Josh have spoken regularly at conferences and the popular CocoaConf Game Development workshop, helping bring cool ideas to life on these marvelous little machines.