In this project we're going to produce a Flappy Bird clone called Crashy Plane. Flappy Bird might seem like a remarkably simple game when you’re playing it, but has a lot going on behind the scenes: there’s physics, animation, infinite scrolling, and more – it’s a worthy choice for a learning project.
Before you start, please download the assets for this project from https://github.com/twostraws/HackingWithSwift so you can follow along. If you haven't played Flappy Bird before, the concept is simple: tap the screen to keep your bird flying, and don't touch the floor of any pipes. In our game it'll be a plane with mountains as obstacles, but the idea is the same.
The assets you download are all licensed under CC0 / public domain, which means you can use them however you want without attribution. If you want to attribute the original authors, see the README.txt file in the zip. The game art comes from a designer called Kenney, who offers a huge selection of public domain game assets in return for a donation – if you're serious about making games you should definitely visit his home page.
All set? Great! Launch Xcode and create a new project from the game template. Choose Swift for your language and SpriteKit for the game technology, then name it Project36 and click Next then Finish. Before we go any further, please change its project settings so that it supports only iPhone in portrait – that’s the natural environment of Flappy Bird.
Get my latest video for free
Learn about value types, functional programming, and protocol-oriented programming in this new video – it's free!