Giter Club home page Giter Club logo

skflappybird's Introduction

SpriteKit Flappy Bird

A SpriteKit rewrite of the world-famous Flappy Bird.

Comments

  • The project uses a "GameObject" protocol that allows SKScene to forward some of its callbacks to conforming children. Ex. SKScene.update() calls update() on all of its children.

  • While the gameplay works great, there's an occasional bug with audio. SKAction.playSoundFileNamed(_:waitForCompletion:) was designed for simple sound effects. Sadly in practice I got unreliable results. Apparently other developers have been encountering this issue for years. A real project might use SKAudioNode or AVPlayer.

  • I don't have every asset from the original game. So no pause button or fancy medals after a game over.

Changes I would make for a bigger game

  • In a larger project I might have made GameObject a word-for-word copy of all SKScene callbacks. Here, it only has 3 functions - setUp(), update() and changeState(to:).

  • Because this game really only takes place in one scene, I ended up using a GameState enum to keep track of which nodes are visible. I'm not a fan of the enum. Each of the states in a real project (menu, playing, game over, settings, etc) would be their own SKScenes and instead of updating an enum case, I would be transitioning to a new SKScene altogether. Breaking them into separate SKScenes would mean fewer nodes to keep track of and no "state" logic making sure the right things are hidden.

Previews

Disclaimer

This application was written for educational purposes under Fair Use. I don't own Flappy Bird or any of its art and audio assets.

skflappybird's People

Contributors

jarwarren avatar savelyukuren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.