Hacking the Google Doodle for Fun and Profit, Minus the Profit

Hacking the Google Doodle for Fun and Profit, Minus the Profit

Like many of my friends (especially my running friends), I’ve gotten a little caught up in Olympic fever this week. Also like many of my friends, I have zero chance of ever making it into the Olympics. But a few days ago, Google released a game that gave all us pathetic slobs a chance to feel what it’s like to take home the gold: The Google Doodle Hurdle Game.

Here at EchoDitto, we rarely miss a Google Doodle, and before long, people were bragging about their times in the company-wide chat room. First, somebody posted a 13.5. Not bad – for a chump. Soon after, another employee laid waste to that pathetic time and posted a 12.9. And then, many bloody fingers later, one intrepid soul (not me) posted a 12.5.

Not one to lose a competition that most people wouldn’t even bother to enter, let alone consider a competition, or even think about for more than four seconds, I resolved to beat the unbeatable time … until my fingers got tired. That took about two minutes. “Oh well,” I thought, “who cares about winning a stupid game?”

But wait. These are the Olympics, damnit, and America isn’t about giving up when things get hard – it’s about finding the fastest, easiest way to get what you want without putting in the work. Drugs! Or … maybe I could use my fingers in a different way. Instead of punching left and right like some kind of trained Olympic monkey, maybe I could hack the doodle, computer style.

And that's just what I did. After a little “practice”, I was able to complete the hurdles in the groin-grabbingly fast time of 0.7 seconds:

U-S-A! U-S-A!

So how did I do this? Well, all we’re really doing with this game is pressing the left and right buttons over and over in rapid succession, and occasionally jumping when we encounter a hurdle. And computers are especially good at doing these kinds of mundane, repetitive tasks. Could we simulate pressing the left and right keys repeatedly?

jQuery is a popular JavaScript library that contains all sorts of useful functions for everyday web development. One of those handy functions is simulating (or “triggering”) a keypress. So basically, all we have to do is “outsource” (another thing America is good at) the button mashing to jQuery. Mmm, I can taste that gold medal now.

Want to gain Olympic glory and impress your friends?* Set your phaser to “nerd” and follow these steps:

Use Firefox. This won’t work in Chrome.

Since the Doodle is a day or two old now, bring it up at this special URL (note: you must use this URL, not the one Google gives you when you finish playing the game. Trust me though it’s legit.):