- A computer (to play the PC game)
- A wii nunchuck
- An Arduino Pro micro
- Some jumper wires
Because I love Agar.io and slither.io
Unfortunately, these PC games were not built for today's gaming controllers. Many people would just say "Nathan, why not make a joystick move the mouse" I said, "Well, it's not that easy!". Well, I mean...sure you could simply move the mouse with a joystick. But I don't think you are realizing how hard it is to move a mouse with a joystick in a PC GAME! 😡
For example, the arduino pro micro has no idea where the mouse is located every millisecond. Because of this, the arduino will move the mouse too far or too close from the player. It's basically like steering a car on an ice lake!
I had to use a different method to play these PC games. That's when I found out about AutoHotKey. This software has the ability to capture the mouse coordinates with extreme precision. Because of this, I decided to make a circular region similar to that of a joystick to where the mouse could travel. So it's kind of like a moat around a Castle.
After I decided to run my project for a real test, I had no idea how easy it was to play this game with my software! You guys should try it too! I might even work with Matheus Valadares, Agar.io's CEO, to make this a real thing on kickstarter with even more feature. One thing is for sure, I am definitely not going to use a wii nunchuck. I probably create my own type of hardware with the arduino pro micro embedded
Used to play with Agar.io or other PC games that require the user's mouse to move a player around with the help of a joystick. *Read complete directions at instructables.com https://www.instructables.com/id/Trap-a-Mouse-Cursor-for-PC-Gaming/ But for those with experience with autohotkey and arduino, these directions below should be enough.
- Run agario.ahk file through the sciTe4Autohotkey programmer.
- hit the play button.
- upload the arduino code to your arduino pro micro(5V version).
- Wire the wii nunchuck to the arduino.
- play (may be necessary to change the center coordinates of the wii nunchuck in the arduino code)
- GO to agario's website for testing.
- go fullscreen and position your mouse exactly on the center of the player(or cell).
- Type the ULTRA COMBO "CTRL+SHIFT+ALT+S"
- And that's it. Go and play! THe wii nunchuck's should map the computer's screen and move according to your movement of the joystick!
- Oh yeah, to exit type "ESC"
- To exit out of AUTOHOTKEY program, type "CTRL+ESC"
- Game Modes: While holding the nunchuck properly, make a stabbing movement up and then downward to change game modes. Current two games modes are AGAR.io(default) mode and Slither.io mode.
- There is also a mouse mode. First hold the c button on the nunchuck and then perform the Game Mode from (part a).
- Scroll Mode 1(In Mouse Mode only): tilt the wii nunchuck sideways to engage scroll mode. In this mode, you move the joystick to scroll across pages.
- Scroll Mode 2(In Mouse Mode only):tilt the other way and you can scroll even FASTER!
- While in Mouse mode, shake nunchuck sideways to disable joystick. 6.While in either Game Mode, shake nunchuck sideways to exit out of a game(Similar to typing "ESC")