• Jack Chen

Fast Fun Week 4: Arduino keyboard to Unity

This week, I made a simple 2 push buttons input controller with Arduino connected to Unity using the keyboard Library. The game is a 2 player interaction consist of one block at the top dropping spheres onto a block at the bottom. The player controlling the top block needs to try drop the spheres onto the bottom block while the bottom block player has to try and dodge the spheres.

For the fabrication of the controller, I ended up using a wood block I cut from fabrication class last semester. The block already had two circular shapes sticking out so I simply taped the 2 Arduino push buttons onto the wood block.

The inputs for the game are WASD with WA and SD each controlling the left and right axis for one of the blocks. However, I wanted to make a simple and unique control for this two player game, so instead of having a button for each key, the press and release of each of the two buttons of the controllers have their own keys.

As a result, one button controls the left and right of one block while the other button does the same for the other block. the pressing and releasing of the button adds a level of (intended) chaos to the control as the cubes will fall onto one side by default unless if the player is actively pressing a button. And it is hard to keep the cubes still as it will require the player to constantly press the button in short bursts.

27 views0 comments

Recent Posts

See All