Digital Mouse Trap

Plenty of PC games rely on the mouse for input, and browser games are no exception. Unfortunately though, this isn’t always the most intuitive controller. [Nathan Ramanathan] combined a couple hacks to get the controller he wanted for playing browser games like Agar and Slither. No rodents were harmed in this project.

The games he wanted to dominate were top-down view so there was no need to move the mouse far from the center of the screen. For a more intuitive interface, a Wii nunchuck with its integrated joystick was selected. Nunchucks were notoriously hackable. An Arduino converted the nunchuck’s data into mouse movements. Inside the computer, Autohotkey kept the mouse pointer reined in where it was useful. Autohotkey was a scripting tool for executing keyboard and mouse macros.

The result was a joystick which controlled these browser games exactly the way you would expect a joystick to control a game. Mouse functionality, including standard and fast scrolling, was an added bonus so games like Minecraft aren’t left behind. The ergonomics of the nunchuck make us wonder why it hasn’t been seen in more wearable hacks.

Custom game controllers are no stranger to Hackaday readers. We’ve seen them built from LEGO blocks, automobiles, and even a decorative rug.

12 thoughts on “Digital Mouse Trap

  1. Really? He “hacked” a game controller to function like a game controller? Mapping joystick inputs to keyboard and mouse inputs has been a thing for as long as joysticks have been a thing. Using an Arduino to do what an easily obtainable free piece of software is designed to do is just asinine. It should not be worthy of an article when someone takes an easy concept and inherently complicates it by adding unneccessary middleware.

    I’ve become exceedingly dissapointed in what Hackaday will pass off as newsworthy.

      1. Here’s one with the wireless Wii nunchuk:

        I built a controller interface for my daughters modified power-wheels, and used a cheap wireless Wii nunchuks (Like £2.50/$3 cheap – normally £15, but these are pink, thus worthless apparently).

        Not a hack?

        No, the hack was to add a safety cut-off. When the signal was lost, the receiver would repeat the last position for ~4 seconds – not good when a child in the car.

        The receiver consists of two IC’s – epoxy blob A and B.
        ‘A’ dealt with the RF stuff, ‘B’ dealt with Wii/i2c stuff.
        Not sure on the comms between the two – probably SPI.

        Ok, more of a bodge: To tell when the signal was lost, I found blob A would instantly clock down one of the lines.
        So my uC would sample the rate and stop the car when this happened.

        I use an ESP8266 now, as it has better range (and I can adjust settings if she’s driving solo)

    1. Can you tell me how exactly would you connect a Nunchuck to a PC to get joystick inputs? You still need a hardware middleware.

      However, the solution can be simplified: Arduino Pro Micro allows for absolute mouse mode, so you can skip Autohotkey altogether.

    2. Sometimes it’s the method, and not the result, that’s worth reading. Just because it was used in a game doesn’t mean it is its limitation. Rather its ‘Hello World’ application.

    3. This was a useful article for me and given that there are multiple articles posted a day there are sure to be ones that aren’t. Maybe if you are finding that there are no articles relevant to you then you could suggest areas of investigation for the HAD team to look into? I mean this website is appealing to a wide variety of audiences so maybe some constructive help could make that audience bigger and thus have more engagement in the comments as well, it would be win-win. Its better than just being a complainer.

      as for how it was useful: i didn’t even consider the wii nun-chuck as a possible controller for a future project i am planning. I wouldn’t implement it the way that the article has done, but there are two other articles linked that gave me a few leads into other ways to do it. So even though the article was of no technical merit to me, idea wise it was very useful.

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.