Developer creates Flappy Bird clone with Apple's Swift in four hours

An Apple developer has made a working clone of the immensely popular Flappy Bird, pulled from app stores earlier this year but confirmed to be returning, in Apple's new Swift programming language within four hours of release.

The app, made by Apple developer Nate Murray, is designed to demonstrate how easy it is to code a product that other people would want to use. He said he was able to build a working version of the game within four hours of Swift being introduced; he had no previous experience of Swift before Apple's WWDC announcement regarding the new language.

The game, named FlappySwift in homage to both the language it is made in and the game it is based on, is a port from an Objective-C version of Flappy Bird made by another developer, Matthias Gall, according to Murray in comments on Hacker News. Objective-C is Apple's de-facto standard programming language for iOS and OS X development; Swift is launching as an easy-to-use alternative to this.

FlappySwift's code is available freely on Murray's GitHub and can be used by people considering developing with Swift to gain a quick overview of how it works and the process of creating games using it. Murray intends to publish a full course on developing games in Swift on his website FullStack.io, co-founded with fellow developer Ari Lerner, in the future.

The fact that he finished the product within four hours of the language being introduced shows just how easy Swift is to pickup and learn. Murray is of course already an experienced developer in the Obejctive-C language that Swift is based on and there is no suggestion that new developers will be able to create a working game quite as quickly as this. It does show that Swift would appear to be accessible to all though.

Flappy Bird went viral earlier this year when it was downloaded millions of times. It was quickly pulled from the app stores by creator Dong Nguyen though as he claimed he "couldn't cope" with the game's popularity and success. It has spawned multiple clones hoping to gain a piece of the product's success but these are likely to be dispersed when the original returns in August this year with an all-new multiplayer mode.

Source: Hacker News via TechHive | Image via FlappySwift GitHub

Report a problem with article
Previous Story

Xbox One dev kit update promises better performance for the console [Update]

Next Story

Chrome challenges today's standards with a 64-bit version, available in beta

31 Comments

Commenting is disabled on this article.

Swift: "Create Loads of Sh!tware for the Apple Store Even Faster Than Before!"

Because there's not enough already there.

About 10% of the developers know Objective C.
And now, from those 10%, only a fraction will learn or use Swift.

So, unless Apple launch it this language as a multi platform or it could happen two things:
a) It will be quite unpopular, this means less community, less support and may be, it will be discontinued.
b) And the very few one that will learn it, they will increase the shovelware in Itunes store.

So, i don't get it the motivation of Apple and it is not to be "pro developers", after all, XCode is still too basic and archaic.

Brony said,
after all, XCode is still too basic and archaic.

Based on what? All the terrible Mac OS X and iOS apps? That's probably your reasoning because of how you choose to define yourself.

Shadrack said,

Based on what?

Lacks of TONS of features that most IDE already had since decades ago. Apple has added some features in Xcode 4 and 5 but Xcode is still behind.

Brony said,

Lacks of TONS of features that most IDE already had since decades ago. Apple has added some features in Xcode 4 and 5 but Xcode is still behind.

Could you please identify the features from decades ago that still do not exist in XCode? Or are you just talking a bunch of hyperbole nonsense?

Shadrack said,

Could you please identify the features from decades ago that still do not exist in XCode? Or are you just talking a bunch of hyperbole nonsense?

Xcode doesn't even have an integrated TSB or DSM reporting tool.

ah yes, flappy bird. The game that made the dev thousands!!!!!

1. Copy Potty Copter (badly)
2. Add on some mario graphics
3. Give it a name
4. Make $$$

Flappy was on NG years and years and years ago :p I think it's obituary is still there somewhere, but it's funny because it got such terrible reviews back then. Now it's the king of games?? I wonder if it's the same person, or if he just copied it..

vcfan said,
I could create it in 10 minutes with asm

Challenge accepted! I expect to see the hex file for running on my Z80 in 30 minutes...

done. i need to encrypt it though,because its only for your eyes to see. for that,i need your credit card number to use an an encryption key.

n_K said,

Challenge accepted! I expect to see the hex file for running on my Z80 in 30 minutes...

Someone owns a Blackberry phone?

AsherGZ said,
What is that link proving?
the link goes to the app that I'm referring to. It proves that this doesn't have to do with how simple or effective swift is, the game is just easy to make on any programming language.

link6155 said,
This shouldn't even be surprising at all, with any programming language. Flappy bird is so simple, that someone even made it with no line of code at all: https://play.google.com/store/...=com.epicgames.TappyChicken

No code?

Is the app using the Tappy Chicken web app in a container?
https://www.unrealengine.com/html5/

In that case, there's lots of code, just not in the app itself.

https://de45xmedrsdbp.cloudfro...son2moz_binarystring.min.js

https://de45xmedrsdbp.cloudfro...73/TappyChicken.data.min.js

https://www.unrealengine.com/a...a053a61fb960173d05928aa4.js

... and more.

Flappy Bird may be a simple game to build a clone of but there sure isn't such a thing as a free lunch.

What is particularly interesting is the fact that Swift will be binary compatible between releases but not source compatible which leads me to wonder whether Swift is a situation of 'work in progress' or Apple deciding they don't want to have a situation of stagnation due to restraints on moving things forward in the future. I'm giving Swift a good read through and it'll be interesting to see how .NET developers react along with traditional C++ developers too.

Sounds like the .NET 2, .NET 3, .NET 3.5 situation where these had various language features but the same compiler. Pretty convenient for developers.

I'm a .NET and C++ developer who react positively to Swift! It's already obvious to me how much easier this will be to get into than Objective-C. The hurdle is reduced to learning Cocoa, not mentally adjusting to a syntax (Obj-C messages) and language features that feel kind of alien. It seems like a "modern feeling" and high performing language.

As for specific language features, I already like that functions are values (feels a bit like F# there), the implementation of closures, and the interesting interpretation of enumerables!

A bit weird how accessibility (public, private, etc) isn't there yet but apparantely it's on the drawing board. Swift's "protocol" feature could work as an interesting alternative to accessibility though.

Edited by Northgrove, Jun 5 2014, 9:27am :

That actually isn't as impressive as it sounds. It is a 2D game with very limited gameplay (as in, there isn't anything to do besides flapping and not dying).

Most of the time it takes to make a game is coming up with the ideas, the concepts, etc and putting them into code to a point that they work well together and it is all balanced. This is just literally taking another game and putting it into code. Everything was laid out for that dev.

All in all, my point is the language has nothing to do with it. It could be done in almost the same time (either less or more, it really just depends on the person doing it) on C#/C++/Java or heck maybe even HTML5.

You do realise what you just wrote with this is that a Java developer could make a C# clone of that crap in 4 hours?

Obviously very recently ;) It is quite a nice little game to make as a more modern hello world to be fair though. Simple enough that an amateur can do it but as nice way to see how simple the language/framework makes things.

Kalint said,
Since when did flappy bird become the standard for demonstrating new languages and engines?

Not earlier than Flappy Bird, so... Since 2014?

I can definitely see it become a trend since the game concept is so simple, yet kind of appealing with an "idea" behind it (the sample game won't become a nonsense game).

And I'm not mad. Why should I be? It can be useful to compare various platforms. It's a simple game, yet managing: the controller, a 2D engine, potentially sound, and textures, etc. It's a nice little thing to introduce programmers to new languages and certainly less boring than demoing a language for gaming and pick something like Reversi or a card game.

Don't worry, be happy! (or flappy)