Friday, 27 April 2012

Google's Zerg Rush

I just discovered that searching for "zerg rush" in Google activates an Easter Egg mini-game where a bunch of Google's 'O' "zerglings" try to destroy your "base", and you have to kill them off before they destroy the whole page.

Back in high school, a friend and I had a blast writing SCAR scripts for flash games, so that we could hold world-wide high scores on Neopets games. (don't try to extract any reason beyond that, we just thought that was a good way to spend our free time in the lab while stuck at school)

For nostalgia's sake, I decided that I needed to have the highest score of anyone I knew. So I wrote a small chrome extension to play the game for me, and achieve a score that I feel is sufficiently high. This fit in nicely with my latest project, which revolves around simulated user input to a browser (blog posts on that topic are one their way).

Check it out on github at


  1. How high of a score could you get with your automated extension? I saw some initial reports of bots getting a 6000 apm with ridiculously high scores.

    I've only been able to get a 93 doing it manually. I created a scoreboard for users to post scores, so hopefully I can find out what the highest realistic user score is: zerg rush scores

    1. It's gotten up to around 1600 kills, I only stopped it because I had to turn my pc off. The limiting factor there is how frequently the game sends zerglings at you. Since the script is operating at the DOM level, the zerglings are being killed before chrome even renders them (in most cases).

      The apm on this bot seems to settle in around 70 apm, as it only clicks *exactly* as much as it needs to. I suspect bots with higher apm monitor the rendered page as an image, so they don't have anywhere near as tight of a feedback loop that mine has access to, leading to excess spam.

      I'll let it run over night an see if there's any scenario that can actually kill it, but the game seems to send a roughly constant stream of average 1 zergling every 2 or 3 seconds.

  2. You need to add
    "manifest_version": 2,
    to the manifest to use it on the latest versions of chrome.