swift implementation of flappy bird. More at fullstackedu.com

Last update: Aug 8, 2022
Comments
  • 1. Bug on Device

    Run on my iphone5 (iOS 7.1.1). Broke when the screen was still dark. Guess is the problem for SpriteKit since even initial game app written in Swift with SpriteKit can't work on device, while change to OC it works fine.

    flappybirdbug

    Reviewed by hehe-wz at 2014-06-04 03:49
  • 2. Xcode 6 crashed when open .sks file

    Everytime when I open .sks file Xcode crashes or even worse system becames freezed (OS X 10.9)..

    This is very annoying cause it prevents me from experimenting with Swift and SpriteKit, anybody experienced this issue too?

    Reviewed by voronianski at 2014-06-04 21:39
  • 3. error in GameScene.swift

    /FlappySwift-master/FlappyBird/GameScene.swift:206:19: Overriding method with selector 'touchesBegan:withEvent:' has incompatible type '(NSSet, UIEvent) -> ()'

    Reviewed by lhlpasser at 2015-05-17 11:59
  • 4. [Critical] 22 build issues in Xcode 6.0.1

    When I try to run FlappySwift in Xcode 6 (official release), I get 22 errors of the same type: Swift Compiler Error: <something> does not have a member named <something else>

    All errors are in the GameScene.swift file. This is a critical error which stops the program from functioning at all.

    Reviewed by vedantchandra at 2014-09-19 14:44
  • 5. dataWithContentsOfFile error

    /Users/macmini/Documents/FlappySwift-master/FlappyBird/GameViewController.swift:17:32: 'dataWithContentsOfFile(_:options:error:)' is unavailable: use object construction 'NSData(contentsOfFile:options:error:)'

    Reviewed by cto123445 at 2014-10-30 10:41
  • 6. In the new version toRaw() is replaced by rawValue

    override func supportedInterfaceOrientations() -> Int { if UIDevice.currentDevice().userInterfaceIdiom == .Phone { return Int(UIInterfaceOrientationMask.AllButUpsideDown.rawValue) } else { return Int(UIInterfaceOrientationMask.All.rawValue) } }

    Reviewed by JetQin at 2014-12-14 01:32
  • 7. GameViewController.swift and 3 errors

    I have download the project, then use xcode 6.3.1 to open FlappyBird.xcodeproj

    however, i have got the follow three errors, andy idea how to fix these issues?

    FlappySwift-master/FlappyBird/GameScene.swift:206:19: Overriding method with selector 'touchesBegan:withEvent:' has incompatible type '(NSSet, UIEvent) -> ()'

    FlappySwift-master/FlappyBird/GameViewController.swift:15:58: 'NSString' is not implicitly convertible to 'String'; did you mean to use 'as' to explicitly convert?

    FlappySwift-master/FlappyBird/GameViewController.swift:34:36: 'UIView!' is not convertible to 'SKView'; did you mean to use 'as!' to force downcast?

    thanks email: [email protected]

    Reviewed by stoneyzhang at 2015-05-30 12:09
  • 8. Is this OK if I make some changes in the game & publish it to the AppStore?

    Hi. I don't know much about the Copyright thing, so please help me out here! Is this OK if I make some changes in the game & publish it to the AppStore (for free)? What should I do about Copyright?

    Reviewed by HappyIosDeveloper at 2019-09-05 08:50
  • 9. Fix compilation errors in Swift 1.2 (Xcode 6.3 beta).

    1. AppDelegate: The type of the launchOptions parameter of the didFinishLaunchingWithOptions function was changed in Swift 1.2.
    2. "launchOptions: NSDictionary?"
    3. has become: "launchOptions: [NSObject: AnyObject]?"
    4. GameScene: Swift 1.2 has introduced a native Set type that bridges with NSSet.
    5. override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
    6. has become: override func touchesBegan(touches: Set, withEvent event: UIEvent) {
    7. GameViewController: Forced conversions in Swift 1.2 are represented with as!. This makes it clear that the conversion may fail if you attempt to downcast to a type that doesn’t represent the value’s type.
    8. let scene = archiver.decodeObjectForKey(NSKeyedArchiveRootObjectKey) as GameScene
    9. has become: let scene = archiver.decodeObjectForKey(NSKeyedArchiveRootObjectKey) as! GameScene
    10. let skView = self.view as SKView
    11. has become: let skView = self.view as! SKView

    NSString objects need to be converted to a Swift String value by casting.

    • let path = NSBundle.mainBundle().pathForResource(file, ofType: "sks")
    • has become: let path = NSBundle.mainBundle().pathForResource((file as String), ofType: "sks")
    Reviewed by remixnine at 2015-05-30 16:48
  • 10. Bird can fly off the screen

    If you keep touching the screen, the bird is able to fly off the screen and avoid all obstacles. This can be easily fixed by adding

    if bird.position.y > self.frame.size.height { bird.position.y = self.frame.size.height }

    inside override func update(currentTime: CFTimeInterval)

    Reviewed by albertor24 at 2014-10-29 22:20
  • 11. Navigation controller updates

    • Add a navigation controller with menu
    • Basic skeleton to offer leaderboard, signout and game play options
    • Add README for AWS cloud setup
    • Update license
    Reviewed by rohandubal at 2018-11-25 18:06
  • 12. Modify The Impulse of the bird

    First of al thank you for this open source project I learned a lot form it😄.

    I played the game as a user and found out that it's pretty hard to get a normal score, actually I can't pass The first block and this annoyed me(as a player)!

    I looked at the code and modify this line in GameScene -> line number 211 bird.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 30))

    into bird.physicsBody?.applyImpulse(CGVector(dx: 0, dy: 22))

    I tried different values and 22 was the most suitable one.

    This GIF below is the original game

    ezgif com-optimize

    And this is modified version

    ezgif com-optimize-2

    Note that here the player touch screen more times and this makes him get into game and pay more attention to the bird's movement.

    Reviewed by hadyhelal at 2020-11-16 21:21
Related tags
Flappy Bird in Swift
Flappy Bird in Swift

FlappySwift An implementation of Flappy Bird in Swift for iOS 8. Notes We're launching a course Game Programming with Swift If you are interested in e

Oct 30, 2021
A 99-player last-bird-flapping battle royale

Flappy Royale A HTML5 Game, built to be embedded in apps using Phaser 3. Setup Clone, and run yarn install, run yarn start to load up into the app: cd

Jul 8, 2022
SwiftUI implementation of the game Wordle.
SwiftUI implementation of the game Wordle.

Wordle In SwiftUI This is my implementation of Wordle in SwiftUI. Explaination I know some of the code does not really make any sense, like random com

May 29, 2022
Swift-WordleSolver - Solve and analyze Wordle games. Command-line tool written in Swift

Swift-WordleSolver - Solve and analyze Wordle games. Command-line tool written in Swift

Jan 26, 2022
Imagine Engine - a fast, high performance Swift 2D game engine for Apple's platforms
Imagine Engine - a fast, high performance Swift 2D game engine for Apple's platforms

Welcome to Imagine Engine, an ongoing project that aims to create a fast, high performance Swift 2D game engine for Apple's platforms that is also a j

Aug 3, 2022
Sage is a cross-platform chess library for Swift.
Sage is a cross-platform chess library for Swift.

Sage is not a chess engine; it's a move generator. Hexe, on the other hand, is able to both generate moves and evaluate them.

Mar 21, 2022
A game engine built with SDL and Swift.

Lark A game engine made with Swift and SDL. This is a pre-alpha work-in-progress. Don't try to use this unless you really know what you're doing. I ba

Mar 11, 2022
A Swift package for Raylib. Builds Raylib from source so no need to fiddle with libraries.
A Swift package for Raylib. Builds Raylib from source so no need to fiddle with libraries.

A Swift package for Raylib. Builds Raylib from source so no need to fiddle with libraries. Just add as a dependency in you game package and go!

Jul 12, 2022
2048 for Swift

swift-2048 A working port of iOS-2048 to Apple's new Swift language. Like the original Objective-C version, swift-2048 does not rely upon SpriteKit. S

Aug 5, 2022
A simple Chess game for iOS, written in Swift
A simple Chess game for iOS, written in Swift

Swift Chess This is a simple chess game for iPhone and iPad, designed for novice players. It features a very simple AI that plays much like a beginner

Aug 8, 2022
iOS Swift Game - Push SpriteKit to the limit
iOS Swift Game - Push SpriteKit to the limit

iOS Swift Project - Legend Wings - EverWing's Mini Clone EverWing is a popular action game. Survive as much you can, earn gold, and upgrade/purchase n

Jul 28, 2022
Simple memory game written in Swift 4 using VIPER Architecture.
Simple memory game written in Swift 4 using VIPER Architecture.

Viper Memory Game Simple memory game written in Swift 4.2 using VIPER Architecture. The Memory Game is a deck of cards where the user needs to find ma

Jun 6, 2022
A project introducing you to Swift

?? My first Memory ?? ?? An introduction to iOS development with Swift. A memory game implementation fetching images from Instagram. This project aims

Jun 6, 2022
2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS
2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS

OctopusKit A 2D game engine based on ECS and written in 100% Swift for iOS, macOS and tvOS. If you've tried making a game in Swift while sticking to t

Aug 6, 2022
Letter Quiz game with swift for ios
Letter Quiz game with swift for ios

LETTERQUIZ Title: LetterQuiz Category: Game Genre: Trivia, Puzzle, Quiz Platform: IOS Language: Swift 4.0 Available at: Developer: Martin Bruland Crea

Feb 3, 2022
ShogibanKit is a framework (not yet) for implementing complex Japanese Chess (Shogii) in Swift. No UI, nor AI.
ShogibanKit is a framework (not yet) for implementing complex Japanese Chess (Shogii) in Swift. No UI, nor AI.

ShogibanKit Framework Shogi, or Japanese Chess, is based on very complex rules, and it is hard to implement all basic rules. This ShogibanKit aims to

Jul 16, 2022
Swift framework for working with Tiled assets in SpriteKit
Swift framework for working with Tiled assets in SpriteKit

SKTiled is a framework for integrating Tiled assets with Apple's SpriteKit, built from the ground up with Swift. This project began life as an exercis

Jun 9, 2022
Swift framework for loading various 3d models in SceneKit

AssetImportKit AssetImportKit is a cross platform library (macOS, iOS) that coverts the files supported by Assimp to SceneKit scenes. Features AssetIm

Jul 21, 2022
it's simple swift find different colour game.
it's simple swift find different colour game.

SWift_FindColourGame it's simple swift find different colour game. This is a sample project students or kids can use to learn how to find difference c

Oct 20, 2021