It Only Takes 18 Lines Of Code To Clone Flappy Bird

It Only Takes 18 Lines Of Code To Clone Flappy Bird

They may be quick and dirty, but that’s why Flappy Bird clones are such an inviting outlet for programmers looking to hone their craft. One such person has managed to resurrect the lost (but never forgotten) mobile gaming wonder with a fierce economy of technical language.

Destructoid recently came across a crappily named Flappy Bird clone known as “Crappy Bird” that was produced with just 18 lines of code. 17, actually, if you don’t count the final line, which is a Douglas Adams quote. Ok, fine, there’s also a closing bracket in there.

Here’s the riveting passage in all its clumsy glory:

It Only Takes 18 Lines Of Code To Clone Flappy Bird

This probably goes without saying, but Crappy Bird doesn’t hold a candle to one of the best (and certainly the most surprising) games of 2014. It isn’t a pretty thing to look at, nor is it all that fun to play. When I showed it to a programmer friend, he also shrugged it off by saying that it’s “18 lines of really ugly code,” and would probably be longer “if he made it readable.” But after playing a few rounds on my browser this morning, at least I can say that it holds true to Flappy Bird’s tradition of giving me punishingly low scores:

It Only Takes 18 Lines Of Code To Clone Flappy Bird

The ugliness of its presentation and code aside, what seems impressive about it is the fact that the creator managed to pull it off in such a succinct fashion. Or maybe not…my same programmer friend noted that you could technically just cram everything into a single line of code if you really wanted to anyway.

The part I find interesting about Flappy Bird is how its deceptive (and therefore often under-appreciated) complexity has helped turn it into a sort of training ground for game design and programming fundamentals. Ian Bogost, Georgia Institute of Technology’s preeminent Flappy Bird theorist, said this of Crappy Bird over instant messenger: “When you get all this infrastructure in place, it’s like saying you drove to work with only one foot.”

In other words, Flappy Bird continues to live on in its strange second life as a piece of de facto training material for budding programmers and game developers. It’s too bad we can’t keep playing the original marvel the way we did last year too though. Maybe we should start calling it “Flappy Code” instead.


The Cheapest NBN 1000 Plans

Looking to bump up your internet connection and save a few bucks? Here are the cheapest plans available.

At Kotaku, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


7 responses to “It Only Takes 18 Lines Of Code To Clone Flappy Bird”