TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

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.

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

BUY OUR BOOKS
Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS 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!

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.