Winning video games by letting Arduino push your buttons

[Lars] shows you how to get a perfect score on the first four levels of BIT.TRIP RUNNER by using an Arduino to time and send button presses. This is a pretty simple game that uses a couple of buttons to jump or slide past obstacles. The constant speed of the character makes it quite easy to time these movements without any input from the game. This means that the pixel sampling which some web-game bots use isn’t really necessary here. Just work out the timing and hard-code it into the sketch. As you’ll see after the break, it works perfectly

The real value of this hack is the guide he wrote to send key presses from the Arduino hardware. It’s not hard at all, but there are several steps and this will get you up and running in no time. Where might you go from here? It wouldn’t take much to turn this into a keyboard prank that misspells all your words.

Comments

  1. Pero says:

    You could actually use pure software to simulate key presses :),however this is one badass looking hack =)

  2. Andrew says:

    How did you calculate the timing so precisely to be able to hardcode the micro? Set up a video camera and analyse it frame by frame?

  3. Lars says:

    It actually wasn’t that hard, as the game has the obstacles lined up with music, so the distance between them often lined up with 1000, 500ms etc. and furthermore the level consist of repeating a pattern four times and a short finale :)

    And just to be correct it’s only programmed to beat one level, level 4 in world 1 (aka lvl 1-4)

  4. Lachlan Neeley says:

    I absolutely love what you have done here!
    Brilliant job, as one of those “pixel web bot” developers this is something I have dreamed of for many years.

  5. Lachlan Neeley says:

    In addition to my previous comment I would like to note that it would be easier to use a function that would send keyboard commands, such as KeyDown(char:byte) and KeyUp(char:byte) in SCAR.

    This wouldn’t require a hardware device – but I understand that this isn’t the point of the article. It would be interesting to see what new options a hardware device would open to this field.

  6. Kozmikchuck says:

    The making your keyboard mispell your words @ least for a pc was easily accomplished with a little bit of code. Even ansi.sys escape codes used with some tricky batch files in old fashioned ms-dos

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,532 other followers