NEW: Learn SwiftUI with my free YouTube video series! >>

Setting up

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 or 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.

LEARN SWIFTUI FOR FREE I wrote a massive, free SwiftUI tutorial collection, and also have a growing list of free SwiftUI tutorials on YouTube – get started today!

MASTER SWIFT NOW
Buy Testing Swift Buy Practical iOS 12 Buy Pro Swift Buy Swift Design Patterns Buy Swift Coding Challenges Buy Server-Side Swift (Vapor Edition) Buy Server-Side Swift (Kitura Edition) Buy Hacking with macOS Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with Swift Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!