Make a device to play Atari’s Lunar Lander game in a browser. Here’s a different version that uses the up, down, left and right arrows. Your device should support the following actions:

  • Send up, down, left, right keypresses, or W, A, S, D keypresses as a USB keyboard
  • Send mouse clicks
  • Move mouse in X and Y direction to desired location to click
  • Your controls should be arranged so that the player can watch the screen, not concentrate on the controls

Make a housing for your controller. Document it according to the project documentation guidelines at the end of this page. For this assignment, you’ll need a microcontroller that can be programmed to be a USB HID device (keyboard or mouse).

For this assignment I wired four arcade buttons to an Arduino MKR1000. I housed the game controller in the same silverware divider box from the Container Store that I used for my music player controller, but with a new custom laser cut top. The box is a great size for a game controller because it's shallow enough to fit nicely in hand and long enough to control with two hands.

The game controller is designed to play the in-browser version of Atari’s Lunar Lander game, which relies on W, A, S, D keypresses for navigation and fuel, and the space bar for boosts. I included only what would be needed when the game is active (the mouse and click are used to navigate to the game and restart the game). Since W, S, A and D translate roughly to "more/less/left/right", I positioned their corresponding buttons into a diamond, with the space bar "boost" button on the opposite side. I chose a flat USB cable because it's thin and flexible enough to fold into the player's hand when they hold the controller.

When demoing the game, I realized that I had designed the controller for right-handed players. I'd like to add a flip switch to the controller that changes the corresponding keys of the diamond of buttons, so that the controller can be oriented to either-handedness with the flip of a switch. I would also like to include a way to restart the game with the controller, so that the player can remain in the world of the game. 

Note the keyboard library is required for your computer to recognize the Arduino MKR1000 as an alternate keyboard.