Introduction: PressKill: an Arduino Game
PressKill is a physical game for four players I designed and made using an Arduino for a school project. The making of the game involves programming, soldering, making vector plans, laser cutting and some gluing. Wanna make a rad game to play with friends? Read on!
Rules for the game:
- When any player presses their button, they get a point and the Deadzone starts.
- When any player presses their button during the Deadzone, they loose and are out of the game.
- 5 seconds after its start the Deadzone ends. There is no indication of this.
- The first player that has five points or is the last to stand, wins.
Step 1: Parts
Here is a list of all the parts that went into the physical build of the game.
- 1 Arduino
- 4 large arcade buttons with optional lights
- 16 female connectors
- 4 white led's
- 4 220 Ohm resistors
- 4 10.000 Ohm resistors
- lots of wire
- heat shrink tubing
- 1 sheet of 3mm MDF wood
I also used the following tools:
- Soldering iron
- Laser cutter
- Heat gun (lighter works as well)
Step 2: Wiring
The wiring itself is not that complicated, it's just tedious because you need to do the same thing four times, once for each button. Here is a good instructable for the button pins: Big-dome-push-button-LinkIt-basics
Alright, here's the thing in just five steps:
- Insert the LED's into the arcade buttons. If your buttons are easily compatible with LED's, great! Mine weren't, so I soldered them in place.
- Attach the female connectors to some wires. I soldered them to strengthen the connection and added some heat shrink tubing, using the heat gun, for safety. I color coded the wires to be negative (grey) and positive (red).
- Solder all the wires for each button to a small piece of perfboard, to add the right resistors. It also helps to organize a bit. Check to included image for a close look at the different wires and resistors. Then connect the wires with the female connectors to the button. now repeat four times!
- Solder all the wires of each button that go into the 5V and GND of the Arduino onto another small piece of perfboard, in parallel. this way you only have to hook two wires to your Arduino instead of eight.
- This is an optional step, but if you like to stay somewhat organized like me, label the wires from each button that go into the PINs of the Arduino. I color-coded mine by button color.
That's about it for the electronics! If you're smarter than me, plan your circuits beforehand so you can manage cables easy and avoid a big spaghetti of wires.
Step 3: Box
For personal reasons, I wanted to make a laser cut box to hold all the electronics. It's a rather simple shape and can easily be made by just sawing wood and drilling round holes, so if that's faster or more accessible for you, that'be a smart move. But let me tell you, those finger joints look cool as heck.
I took the pattern for the box from makercase.com, who make it really easy to not draw all the finger joints myself. I then modified the pattern in Inkscape, a free vector drawing program. In my experience Inkscape isn't good at exporting .dxf-files that are read by the laser cutter, so a solution for that problem is to use Adobe Illustrator.
The box itself measures 30 x 30 x 10 centimeters. Once you have your mdf laser cut you can glue the panels together. Don't glue the bottom in though! It serves as a upside-down lid to access the hardware. You can make it attachable by gluing some magnets to the inside. I didn't, simply because I didn't need to. It is a good decision if you want to move the box a lot without the bottom falling off.
Note: the plans provided in this instructable don't include a hole for a power cable to the Arduino. I drilled one myself, but you can change the plans to accommodate one, or put a 5 V power source inside the box. There's still plenty of space for that.
Step 4: Code
Here's the code for the Arduino. It's made by me and can contain bugs, although I haven't noticed any yet, for now. It's commented and you're very free to further optimize, modify or add to it.
Step 5: Have Fun!
This may sound cheesy, but I do mean it: have fun making and playing! Just also remember: not having fun is also part of the fun of making. If you get stuck, play around and experiment to find new solutions to problems. It's how I was able to make this game. Thanks for reading!
4 years ago
This would be a fun way to develop you internal sense of timing.