How to create a Flappy Bird inspired iPhone game in Swift 2

See how I create a socially integrated and monetized game. Everything you need to create an immersive game using Swift 2
4.2 (28 ratings) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
3,117 students enrolled
$19
$200
90% off
Take This Course
  • Lectures 42
  • Length 7.5 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 9/2015 English

Course Description

LATEST UPDATE: Integrating our iPhone game with Twitter

PREVIOUS UPDATE: Saving the user's High score to local storage using NSUserDefault and updating a third party SDK in your project (Chartboost SDK).

The “How to create iPhone Flappy Birds inspired iPhone game with Swift” Course is a comprehensive step by step course. You will learn how to put a modern, socially integrated and monetised iPhone game together. The inspiration for the course comes from the world famous game Flappy Birds. Let me be very clear on my next point. The concepts you will learn in this course can be applied to any idea you have for an iPhone game.

In the 40 lectures and over 7 hours of content, we will start by covering off all the basis to get you going. We will install Xcode and run through the basics of the Xcode environment. We will then moving on quickly to start building the scenes and background to our game. After that we will build the pipes and the main character. Not long after that we will look at introducing physics properties to our game objects. Now are our game is starting to take shape. We can them look at how our user is going to score in the game. Once that is all done we will introduce Chartboost ads to monetise our game. Then we will integrate our game with two the biggest and best social media networks… Facebook and Twitter. We will also connect our game up to a Game Center Leaderboard to track our users high scores.

Once we have complete all of that I will finish off on talking the next steps I think you should take...

I’ve done all the research, read the Swift documentation, searched the web for how to perform certain functions in an iOS game and put all the ideas and concepts into one complete package. There is no need to look any further: This course is a one stop shop to get you started in building your own unique iPhone game.


This course will continue to grow and be updated with new trends and to accommodate for new software version updates.

What are the requirements?

  • MAC OSX
  • Xcode 7
  • Beginner level of programming knowledge
  • Or no programming knowledge
  • To complete the Game Center Leaderboard part of this course (section 9). You will need to have an Apple Developer Account.

What am I going to get from this course?

  • Create a Flappy Bird inspired iPhone game in swift 2
  • Learn how to program an iPhone game with Swift 2
  • Learn the Xcode 7 environment
  • A complete and working iPhone game that is monetised and socially integrated.
  • After taking this course you will be confident enough to start creating your very own iPhone game.
  • The skills you will attain from taking this course will be valuable and viable for years to come.
  • Learn how to use Apple's SpriteKit framework
  • Learn how to use Apple's AVFoundation framework
  • Learn how to use Apple's Social framework
  • Learn how to use Apple's Accounts framework
  • Learn about GameViewControllers and SKScenes
  • Learn how to integrate an iPhone game with Facebook
  • Learn how to integrate Chartboost Ads into an iPhone game
  • Learn about storing data on the iPhone with NSUserDefaults
  • We will learn how to connect our game up to a Game Center Leaderboard
  • We will learn how to save the user's high score to NSUserDefaults so the score will not be lost if the game is closed and re-opened.
  • We will learn how to update a third party SDK framework in your project, we will use the Chartboost SDK as an example.
  • Learn how to integrate an iPhone game with Twitter

What is the target audience?

  • Do you want to develop an iPhone game but you're just not sure where to start?
  • Have you already started to create a game and need some help?
  • Do you find yourself trawling the internet for hours but you just can’t find the solution you are looking for?
  • People who want to make money from building their own iPhone game
  • This course has been designed for someone with a beginner or intermediate level of programming knowledge.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Introduction
08:26

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture I will show you how to install Xcode, run through an overview of the Xcode environment and talk about the Apple Developer program.

Please view the downloadable resource for updates

03:12

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture I will show you have to create an Xcode project file using the Game template. I will also take you through all the basic configuration settings of a new project.

Please view the downloadable resource for updates

06:31

In this lecture I will show how to return the Game template project file in Xcode back to a blank canvas. We will use this project file to build our game in.

02:11

In this lecture I will show you the actual game we will be creating in this course. This will be an onscreen demo of the game mechanics and layout. Enjoy...

Section 2: Background, pipes and the main character
09:50

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will build the background and the ground image for our game scene. We will learn about the SpriteKit framework.

Please view the downloadable resource for updates

11:39

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will work on the ground image that we created in the previous lecture. We will make it loop across the bottom of the game scene. We will learn more about the SpriteKit framework, SKActions and for loops.

Please view the downloadable resource for updates

06:04

In this lecture we will be creating a way to start the game moving. We will create the functionality that starts the game when we tap on the screen.

12:52

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will start creating the parallax scrolling background that is the backdrop for our game scene. We will learn about the SpriteKit framework.

Please view the downloadable resource for updates

16:33

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will complete the parallax scrolling background.

Please view the downloadable resource for updates

15:59

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will start creating the pipes that are the obstacles for our game scene. The pipes will be spawned on to the scene in a set of two with random gaps between each set. We will learn about creating a random number.

Please view the downloadable resource for updates

09:59

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will complete the pipes that are the obstacles for our game scene. We will learn more about SKActions.

Please view the downloadable resource for updates

18:42

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will start creating the main character in our game scene. The name of the character is Birdy. In the next section we will look at making the Birdy fly in the air. We will also create an animation to make the Birdy flap its wings.

Please view the downloadable resource for updates

Section 3: How to make our game objects collide
12:44

In this lecture we will start add SKPhysics properties to our game scene objects.

09:56

In this lecture we will continue to add SKPhysics properties to our game scene objects and start to learn about collision detection in our game with the SpriteKit framework.

11:13

In this lecture we will make our birdy fly like a little bird. This will be done by adding an impulse to the birdy every time we tap on the screen. We will also look at how we can make the birdy tilt up and down as it is flying. We will learn a function in Xcode called touchesBegan.

09:13

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will set up collision detect so we can start to keep score and end the game.

Please view the downloadable resource for updates

06:15

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will continue with working on collision detection in our game. We will learn about a function in Xcode called didBeginContact.

Please view the downloadable resource for updates

Section 4: How to keep score
05:47

In this lecture we will learn about how we can display the user's score on the screen using NSInteger's and SKLabelNode's.

14:13

In this lecture we will start setting up the game over scene. We will also create functionality around how our game will transition from the game scene to the game over scene when the game is over.

14:03

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will learn how to create a button with an image file and some functionality to it. This button will be displayed in our game over scene. It will be a play again button so the user can start playing the game again straight away. We will learn about the UIKit framework, we will use UIButton's and UIImage's.

Please view the downloadable resource for updates

16:38

In this lecture we will learn how to display the user's score in the game over screen. We will learn more about the UIKit and UILabels. We will also let how to bring the user's score across to the game over scene from the game scene. We will use a constant variable created in a separate swift file to achieve this.

Section 5: How to add music and sound effects into our game
16:20

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will set up our game to play audio files using the AVFoundation framework.

Please view the downloadable resource for updates

09:15

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will start creating creating a button to the user can mute or un mute the audio that we have playing in our game.

Please view the downloadable resource for updates

12:47

In this lecture we will enable our game to save a setting to remember if audio is muted or unmuted in our game. We will learn all about NSUserDefaults in this lecture.

13:37

In this lecture we will add the functionality into our mute button that will enable the user to mute and unmute the audio played in our game.

Section 6: Custom App Icon and Launch Image
02:57

In this lecture we will learn how to add in the own custom App Icon into the project. I will provide all the artwork for this, please download the images file for this lecture before starting on this lecture.

04:02

In this lecture we will add our own custom launch screen to our game. I will provide all the artwork for this, please download the images file for this lecture before starting on this lecture.

Section 7: Monetise with Chartboost Ads
05:25

In this lecture we will talk about monetising our game using Chartboost ads. Please note: If you follow my steps in this lecture you will not be charge anything. However you will need to sign up for a free Chartboost account to complete this section. We will then set up a publishing campaign so we will be able to display ads in our game.

http://www.chartboost.com

11:24

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will configure our game project to use the Chartboost framework so we can display ads in our game. We will also learn about Objective-C bridging headers in the lecture.

Please view the downloadable resource for updates

08:22

In this lecture we will learn how to display Chartboost ads in our game.

03:23
As we will be updated the Chartboost SDK these steps can the followed whenever you need to update a third party SDK in your Xcode project.
Section 8: Integrate with Facebook
19:59

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will configure our game to access Facebook. We will learn about the Social framework and the Accounts framework.

Please view the downloadable resource for updates

14:50

** This lecture has been updated for Xcode 7 and Swift 2.

In this lecture we will set the post functionality. We will look at how we can take a screenshot of the game play and post this to our Facebook timeline.

Please view the downloadable resource for updates

04:42

In this lecture we will complete the Facebook integration and test this in the simulator.

Section 9: Connect your game to an Apple Game Center leaderboard
11:26
Learn how to set up a provisioning profile, create a leaderboard in iTunes Connect , upload custom artwork for your leaderboard and configure your Xcode project to use Game Center
12:10
Learn how to display a Game Center sign in screen so our user’s can log into Game Center.
14:25

Learn how to send the user's highest game score to a Game Center leaderboard

15:04
Learn how to display a Game Center leaderboard to a user from within your game
18:36
We will be learning how to save user’s high score to persistent storage with NSUserDefaults. We will do this so that when the user closes the game and then re-opens it the user’s current high score is saving. Please note if the user deletes the game and then re-installs it the saved high score in NSUserDefaults will have been deleted.
Section 10: Post a message on Twitter
07:18

In this lecture we will be setting up a button in our Game Over scene that will initiate the SLComposeViewController that will allow our users to post a tweet to twitter. We will be reusing the Social framework and Accounts framework that we added to our Xcode project back in Section 8 (Facebook).

06:06

In this section we will add the functionality that will allow our users to send a tweet from within our game. We will also hook up what button we created in the previous lecture with this new functionality in our game.

Section 11: The next step
03:19

In this lecture I will talk about the next steps I think you should take if you want to submit a game to the app store. This will involve looking at the game you have created in this course and turning it into something for yourself. This will be a challenge but it will be worth the effort.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Ben Kane Johns, Indie Game Developer and Teacher

My name’s Ben Kane Johns. I’m the creator of “How to create a Flappy Bird inspired iPhone in Swift 2” and ‘How to create a Mr Jump inspired iOS game in Swift 2.’

I strongly believe that:

·         Indie games development is driving the future of games.

·         Indie games development gives you the skills and freedom to create truly innovative and interesting games with MASSIVE potential.

·         There’s no time to waste: indie developers who start now - could be the business leaders of the games industry tomorrow.

HERE’S MY STORY…

Ever since I was a little boy, I’ve been obsessed with gaming. From Super Mario Brothers to Pacman - I never left home without my tiny little Nintendo handheld.  One day when I was 16 years old - while washing dishes in a grimy fast food restaurant - I wondered how I could escape a life of grub work and turn what I loved doing, into a full time career.

I worked my socks off. Followed my vision. And today I’m just as devoted and fanatical about gaming as ever - except now I use that enthusiasm as a Udemy teacher and professional mobile games developer.  It’s a job that gives me and my lovely family an incredible lifestyle, and allows me lots of free time to pursue my hobbies - guitars and fast cars!

I love teaching people how to program… and seeing them go on to do inspirational things. Because once you learn how to create mobile games, the possibilities for your life and career are endless. I cannot wait to share these incredible skills with you, right here on Udemy. Join me today and let’s get to work.

Ready to start learning?
Take This Course