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 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.


    A Perl programmer could do it in one line.

      A bad programmer would do it in one line. Only a handful of languages have line feeds as required syntax.

    Yeah, that's not 18 lines under any standard definition.

      Yeah its a block of hard to read code that should probably be spread out to 3-4 times the size for readability. All the variable names are terrible, too.

    18 lines or not, it is an amazingly small lump of code to have a working game. of the best games of 2014.

    You've got to be kidding.

    18 lines plus all the lines in the libraries behind it that make it actually do something

Join the discussion!

Trending Stories Right Now