NEW: Master Swift design patterns with my latest book! >>

< Previous: Overview   Next: Building the environment: SKTexture and filling a path >

Setting up

This game project will be hugely recognizable to people over the age of 30 because it was the classic way to waste time during computer classes at school.

The game? It's called Gorillas, and it first shipped with an old text-based operating system called MS-DOS 5.0 way back in 1991. Of course, we're going to re-make it using SpriteKit, but at the same time you're going to learn some new things: how to make colors from hues, texture atlases, scene transitions, mixing UIKit with SpriteKit, and destructible terrain. You'll also get a recap on the Core Graphics techniques from project 27.

"Destructible terrain" means "terrain that can be destroyed," which is a key part of Gorillas. If you've never played it before, you won't know that it pits two players against each other, both standing on high-rise buildings and both flinging exploding bananas at each other using physics. Realistic, right? Well, no, but it's certainly fun!

Make a new SpriteKit project named Project29. Please make it target iPads in landscape orientation, then through the usual project cleaning effort to remove all of the unneeded template code – including, as always, setting the anchor point to X:0 Y:0 and size 1024x768. You should download the files for this project from GitHub (https://github.com/twostraws/HackingWithSwift), but for now please only copy the file Helper.swift into your project.

Get six books for only $150

The Swift Power Pack includes my first six books for one low price, helping you jumpstart a new career in iOS development – check it out!

< Previous: Overview   Next: Building the environment: SKTexture and filling a path >
Click here to visit the Hacking with Swift store >>