Watch_me

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.

Printed in full color.

Buy Now

Select a DRM-free Format:

In Stock
In Stock
In Stock
Buy the eBook and get these DRM-free formats delivered immediately:
  • epub (for iPhone/iPad, Android, eReaders)
  • mobi (for Kindle)
  • PDF
We can automatically send them to your Kindle, and your Dropbox. (You'll need to log in to enable these options.)
 

About this Book

  • 216 pages
  • Published:
  • Release: P1.0 (2014-07-23)
  • ISBN: 978-1-94122-210-2

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.

What You Need

You need a computer running Mac OS X Mavericks and Xcode 5.

User Level

Beginning iOS developers who want to write games and interactive applications.

Contents and Extracts

Introduction
  • 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

About the Author

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.

Comments and Reviews

  • This book is your quickest path from creating a new Sprite Kit project in Xcode to shipping an iOS game. Joshua and Jonathan have a great deal of experience creating games with Sprite Kit and teaching the technology in their popular seminar. In this book they show you the fundamentals and help you avoid the gotchas.

    —Daniel H. Steinberg Dim Sum Thinking
  • I had never written a game before, but with hands-on practice, this book guided me through the basics of how to set up a Sprite Kit app. In detail, it covers how to progress from the basics up to advanced topics, like physics, textures, and frame-based animations. This book is a great way to dip your toes into the exciting new Sprite Kit framework.

    —Ash Furrow iOS Developer
  • Apple’s documentation for Sprite Kit is pretty good, but it’s not enough. Jonathan and Josh make it easy to understand the concepts behind developing games with Sprite Kit. Throughout the book you will develop two complete games while having fun learning about scenes, sprites, textures, and sounds. Are you building a new game with Sprite Kit? Just buy this book and read it.

    —Cesare Rocchi CEO Studio Magnolia
  • As an iOS developer wanting to step into the world of mobile-game development, I really enjoyed reading this book. It’s a great introduction to Sprite Kit, explaining the basics and the more advanced stuff very well.

    —Romain Pouclet iOS Developer TechSolCom
  • Rather than just telling the reader what to do, Jonathan Penn and Joshua Smith walk the programmer through why they are using a given method or set of numbers. Very few people go to this trouble, which is one big reason this book is a must-read.

    —Janie Clayton-Hasz iOS developer Digital World Biology LLC
  • After reading the book, game development on iOS seems less wizard-like. I would not be surprised if there were a flood of games released on the market due to how easy the authors made it seem.

    —John Moses developer
  • This is a fun book! Sprite Kit makes it easier than ever to build games for iOS, and these authors know their stuff and know how to get you up and running with it in no time.

    —Kevin Munc mobile developer and founder Method UP LLC
  • This book was so much fun to read and follow along with that by the time I was done, I had developed a solid grasp of the Sprite Kit APIs plus a fully featured game end-to-end. Well done, Rubber City Wizards!

    —Zak Nixon lead software engineer and CEO Deep Digital LLC