2D iOS & tvOS Games by Tutorials

2D iOS & tvOS Games by Tutorials

Learn how to make iOS & tvOS games using Swift 2.2, Sprite Kit and GameplayKit.

  • Who Is This Book For?

    This book is for beginner to advanced iOS developers. Whether you are a complete beginner to making iOS games, or an advanced iOS developer looking to learn about Sprite Kit, you will learn a lot from this book!

    This book does require some basic knowledge of Swift. If you are new to Swift 2, we suggest you read the Swift Apprentice, which takes you on a comprehensive tour through the Swift language, even if you are a complete beginner.

  • Fully Up-to-Date

    The current version of this book is up-to-date with Swift 2.2, iOS 9, and Xcode 7.3. You will also get a free update to the book for Swift 3, iOS 10, and Xcode 8.

  • 2D iOS & tvOS Games by Tutorials

    2D iOS & tvOS Games by Tutorials: Beginning 2D iOS & tvOS Game Development

    Learn how to make iOS & tvOS games using Swift 2.2, Sprite Kit and GameplayKit.

    Written by: Mike BergMike BergMichael BriscoeMichael BriscoeAli HafizjiAli HafizjiNeil NorthNeil NorthToby StephensToby StephensRod StrougoRod StrougoMarin TodorovMarin TodorovRay WenderlichRay Wenderlich


    2D iOS & tvOS Games by Tutorials is 29 chapters and 801 pages – yeah, it’s pretty huge :]

    The book is split into five sections, moving from beginning to advanced topics. In each section, you will create a complete mini-game, from scratch! The book also includes some bonus chapters at the end that we think you’ll enjoy.

    Let’s take a look at what’s inside!

    Section I: Getting Started

    This section covers the basics of making 2D games with Sprite Kit. These are the most important techniques, the ones you’ll use in almost every game you make. By the time you reach the end of this section, you’ll be ready to make your own simple game.

    Zombie Conga

    Throughout this section you will create an action game called Zombie Conga, where you take the role of a happy-go-lucky zombie who just wants to party!

    You will build this game across seven chapters, in stages:

    • Chapter 1, Sprites: Get started by adding your first sprites to the game: the background and the zombie.
    • Chapter 2, Manual Movement: You’ll make the zombie follow your touches around the screen and get a crash-course in basic 2D vector math.
    • Chapter 3, Actions: You’ll add cats and crazy cat ladies to the game, as well as basic collision detection and gameplay.
    • Chapter 4, Scenes: You’ll add a main menu to the game, as well as win and lose scenes.
    • Chapter 5, Camera: You’ll make the game scroll from left to right, and finally, add the conga line itself.
    • Chapter 6, Labels: You’ll add a label to show the zombie’s lives and the number of cats in his conga line.
    • Chapter 7, Beginning tvOS: You’ll get Zombie Conga working on tvOS, in just a few simple steps!

    Section II: Physics and Nodes

    In this section, you will learn how to use the built-in 2D physics engine included with Sprite Kit to create movement as realistic as that in Angry Birds or Cut the Rope. You will also learn how to use special types of nodes that allow you to play videos or create shapes in your game.

    Cat Nap

    In the process, you will create a physics puzzle game called Cat Nap, where you take the role of a cat who has had a long day and just wants to go to bed.

    You will build this game across five chapters, in stages:

    • Chapter 8, Scene Editor: You’ll begin by creating the first level of the game. By the end, you’ll have a better understanding of Xcode’s level designer, better known as the scene editor.
    • Chapter 9, Beginning Physics: In this chapter, you’re going to make a little detour in order to learn the basics of creating physics simulations for your games. As a bonus, you’ll learn how to prototype games inside an Xcode playground.
    • Chapter 10, Intermediate Physics: You’ll learn about physics-based collision detection and create custom classes for your Sprite Kit nodes.
    • Chapter 11, Advanced Physics: You’ll add two more levels to the game as you learn about interactive bodies, joints between bodies, composed bodies and more.
    • Chapter 12, Crop, Video and Shape Nodes: You’ll add special new blocks to Cat Nap while learning about additional types of nodes that allow you to do amazing things—like play videos, crop images and create dynamic shapes.
    • Chapter 13, Intermediate tvOS: In this last chapter you are going to bring Cat Nap to the silver screen. You are going to take the fully developed game and add support for tvOS so the player can relax on their couch and play the game using only the remote.

    Section III: Juice

    In this section, you’ll also learn how to take a good game and make it great by adding a ton of special effects and excitement – a.k.a. “juice.”

    Drop Charge

    In the process, you will create a game called Drop Charge, where you’re a space hero with a mission to blow up an alien space ship – and escape with your life before it explodes. To do this, you must jump from platform to platform, collecting special boosts along the way. Just be careful not to fall into the red hot lava!

    You will build this game across four chapters, in stages:

    • Chapter 14, Making Drop Charge: You’ll put together the basic gameplay using the scene editor and code, flexing the Sprite Kit muscles you’ve developed working through previous chapters.
    • Chapter 15, State Machines: You’ll learn what state machines are and how to use them.
    • Chapter 16, Particle Systems: You’ll learn how to use particle systems to create amazing special effects.
    • Chapter 17, Juice Up Your Game: You’ll trick out your game with music, sound, animation, more particles and other special effects, experiencing for yourself the benefits of mastering the details.

    Section IV: GameplayKit

    In this section, you’ll learn how to use iOS 9’s new GameplayKit to improve your game’s architecture and reusability, along with adding pathfinding and basic game AI.

    Dino Defense

    In the process, you’ll create a fun tower defense game called Dino Defense where you construct a perfect defense to save your village from an onslaught of angry dinosaurs!

    You will build this game across three chapters, in stages:

    • Chapter 18, Entity-Component System: You’ll learn all about modeling your game’s objects using the new `GKEntity` and `GKComponent` objects provided with GameplayKit, and you’ll use what you’ve learned to implement your first dinosaur and tower.
    • Chapter 19, Pathfinding: You’ll use GameplayKit’s pathfinding features to move your dinosaurs across the scene, avoiding obstacles and towers.
    • Chapter 20, Agents, Goals and Behaviors: Finally, you’ll add a second dinosaur to your game that will use a `GKAgent` with `GKGoal` and `GKBehavior` objects to move across the scene as a more organic alternative to pathfinding.

    Section V: Advanced Topics

    In this section, you’ll delve into some more advanced topics like procedural level generation, GameplayKit randomization, and game controllers.


    In the process, you’ll create a tile-based dungeon crawler called Delve where you try to guide your miner through a rock-elemental infested dungeon.

    You will build this game across four chapters, in stages:

    • Chapter 21, Tile Map Games: You’ll learn techniques for building tile map levels, including how to create a fully functional tile map game.
    • Chapter 22, Randomization: Take advantage of the new GameplayKit class `GKRandom` to generate the game world.
    • Chapter 23, Procedural Levels: Remove some of the random aspects of the level generation to make the process more predictable, but still an adventure into the unknown.
    • Chapter 24, Game Controllers: This game is perfect for external game controllers; you’ll be adding a tvOS target and exploring how to use the Apple TV remote as a game controller.

    Section VI: Bonus Chapters

    And that’s not all – on top of the above, we have some bonus chapters for you!

    In these bonus chapters, you’ll learn about some APIs other than Sprite Kit that are good to know when making games for iOS. In particular, you will learn how add Game Center leaderboards and achievements into your game, use the new iOS 9 ReplayKit API, and add iAds into your game.

    Circuit Racer

    In the process, you will integrate these APIs into a top-down racing game called Circuit Racer, where you take the role of an elite racecar driver out to set a world record. It would be no problem if it weren’t for the debris on the track!

    You will work with this game across four chapters, in stages:

    • Chapter 25, Game Center Achievements: Enable Game Center for your game and award the user achievements for accomplishing certain feats.
    • Chapter 26, Game Center Leaderboards: Set up various leaderboards for your game and track and report the player’s scores.
    • Chapter 27, ReplayKit: You’ll learn how to allow players to record and share videos of their games with iOS 9’s new ReplayKit.
    • Chapter 28, iAd: You’ll learn how to integrate iAds into your game so you can have a nice source of revenue!

    We have also included a bonus chapter about making your own game art:

    • Chapter 29, Making Art for Programmers: If you liked the art in these mini-games and want to learn how to either hire an artist or make some art of your own, look no further than this chapter! This chapter guides you through drawing a cute cat in the style of this book with Illustrator.

Order 2D iOS Games By Tutorials today!

File formats and delivery

The source code for each book comes as Xcode projects and the books come in PDF format. You can download each book on your My Loot page immediately after purchasing.

If you purchase the print version of the book, we will ship the book out within 3-5 business days once the book has been released. Please then allow time for delivery (time varies widely based on country).

What’s your refund policy?

We have a 30-day 100% satisfaction guarantee for the PDF version. We do not offer refunds for the print version. If you buy the Print + PDF Bundle, then the PDF portion is refundable for half the cost of the bundle.


If you have any further questions that the above description hasn’t covered, feel free to ask a question in the forums and we’ll get to you as soon as possible!

What are you waiting for?

Sprite Kit and GameplayKit are two of the most exciting APIs ever released in iOS – at least if you are gamers like we are!

The easiest way to learn Sprite Kit and GameplayKit is through this book. You’ll get hands-on experience by making the mini-games, and then get to practice what you learned on your own through a series of challenges. By the time you’re done, you’ll have a wealth of knowledge and be truly inspired.

Make good on your dreams to create some amazing iOS & tvOS games by picking up your copy of 2D iOS & tvOS Games by Tutorials today!

You might also like our other products: