Posts | Comments

Planet Arduino

Archive for the ‘game’ Category

Bob Clagett likes making holiday decorations. This year, however, he wanted to create something that didn’t just look nice, but was also interactive. What he came up with is a giant Christmas tree that is actually a video game!

His tree-shaped matrix uses seven rows of RGB LEDs attached to the top of the structure to drop simulated snowflakes, represented by white lights. The player moves a dot on the bottom right and left to dodge these falling flakes via a pair of large arcade-style buttons. When the controlling Arduino Mega sees that the player’s position is the same as a snowflake, the game ends.

As Clagett’s community can attest, the project looks like a lot of fun! Code for the build is available on GitHub.

To make our Christmas tree game light up in the way that we intend, we have to be able to control each LED in an entire strand of lights. Traditional lights just have power run to colored bulbs, which blink or stay lit all together. We found a strand of individually addressable LEDs that are made for outdoor use. This means that each light has a small circuit board attached to each bulb that will receive power and a data signal from a micro-controller. I’m using an Arduino as the micro-controller to send out a signal to each specific light among the many strands.

Our game is very simple, there is a “player” that is restrained to the lowest level of lights in our tree-shaped matrix. That “player” can move left or right to avoid falling “snow.” When the game is played, the player will move while white “snow” lights fall randomly from the top of the tree-shaped matrix. If the “player” and the “snow” occupy the same space on the matrix in the arduino code, you lose. When the game isn’t being played, I used a simple LED flash library to create a Christmasy-looking color series that flashes until someone activates the game.

Now that the game code is working, the lights are blinking appropriately, and the control buttons are moving the “player” around, it’s time to make it look like a tree. To do this, Josh and I drilled holes at even space along some thin PVC material and fed in the lights. Covering those light boards with ping pong balls will help diffuse the LED light and give the whole tree a polished and clean look. These seven LED light boards are then connected to a hub at the top of a 10-foot metal pole. To keep the pole firmly planted on the ground, I poured a bucket of concrete and fixed a pole holder into it.

Escape rooms are awesome for people who like to solve puzzles, see how things work, or enjoy a mystery. Everyone reading this falls into at least one of those categories. We enjoy puzzles and mysteries, but we have a fondness for seeing how things work. To this end, we direct your attention to [doktorinjh]’s “Bomb Disarming Puzzle in a Suitcase” Game, which is a mysterious puzzle box he built himself. I guess the mystery is mostly in the gameplay, which you can watch below because he shows us his build photos and describes the hardware inside.

At its heart is an Arduino Mega, a wise choice since our back-of-the-napkin estimation puts his I/O count over forty-five and the Mega can handle them all with a few pins to spare. Working inside the confines of a briefcase came with its own challenges, but we adore the way he used the hexagon theme in the top panel to allow for knob clearance. It was so subtle that we almost missed it.

The escape room theme is delightful, and we appreciate the mix of games, aesthetics, and techno-trickery in many forms.

To experience an escape room, you normally need a rather large dedicated space. This project, however, by creator Jason R, takes this physical clue-solving concept and shrinks it down to fit within a small suitcase!

To play, participants have to work their way through a series of problems, supplied in the ‘TOP SECRET’ documentation attached to and inside the device, connecting jumpers, flipping switches, and turning knobs as needed. 

A computerized voice guides you along the way, with LEDs and an LCD panel providing visual output as you save the day. The game is controlled via an Arduino Mega, while power supplied by a rechargeable USB power bank.

I created an “escape room-esque” game that is contained within a small suitcase. In total, there are about 15-20 puzzles and sub-puzzles that need to be solved in order to disarm the “explosives”. Players are given 60 minutes to arrange puzzles, decipher clues hidden in QR codes, connect cities in maps to form numbers, decode morse signals, and other similar things. 

As a kid you may have played Operation, but certainly never anything like this nine-foot board from SPOT Technology. This device is not only impressively large, but assists doctors in their surgical pursuits with a CNC gantry setup to pull out obstructions.

In the game, amateur surgeons control the system using a small arcade cabinet next to the patient (Sergio), moving a magnetic gripper with a joystick and buttons. A camera rides along and transmits images to the cabinet, hopefully leading to a clean extraction. If the gripper isn’t aligned correctly, a button on the plunger reports the doctors error, and Sergio’s nose lights up red to indicate a failed surgery. Two Arduino Megas are implemented, one on the CNC playfield itself, another in the cabinet.

The project will be on display at the Philadelphia Mini Maker Faire on October 6th if you’d like to see it in person.

Consider the game of chess. It’s a game that flexes one’s “mental muscles” rather than relying on brute strength, but if you don’t have the ability to actually move the pieces, things get a bit more challenging. If you’re playing against another human opponent, he or she could move for you based on what you say, but with this chess machine by ‘diyguypt,’ the board does the job for you!

The system uses an Android-based Arduino Voice Control app to take in commands, and passes this information along to the Arduino Mega concealed under the board via an HC-05 Bluetooth module. It then controls a pair of stepper motors to move an electromagnet into place, which pull the pieces across the grid as if by magic! 

Code and build info are available in the project’s write-up, and the two videos below shed a little more light on how it works.

If you’d like to bring the air hockey arcade experience home with you, then look no further than this project by Kousheek Chakraborty and Satya Schiavina, or ‘Technovation.’ 

Cleverly, the scaled-down game table uses a household vacuum cleaner blower attachment to provide air pressure, sending little jets of air through a grid of laser-cut holes on the acrylic playing surface.

LED lights embedded in the sides add a bit more excitement to the build, and points are tallied with an Arduino Uno-based LCD score display. A pair of buttons are used to register a points for either player, hopefully eliminating arguments over who is ahead as the game progresses!

We all have a gaming system in our pocket or purse and some of us are probably reading on it right now. That pocket space is valuable so we have to budget what we keep in there and adding another gaming system is not in the cards, if it takes up too much space. [Kevin Bates] budgeted the smallest bit of pocket real estate for his full-size Arduboy clone, Arduflexboy. It is thin and conforms to his pocket because the custom PCB uses a flexible substrate and he has done away with the traditional tactile buttons.

Won’t a flexible system be hard to play? Yes. [Kevin] said it himself, and while we don’t disagree, a functional Arduboy on a flexible circuit makes up for practicality by being a neat manufacturing demonstration. This falls under the because-I-can category but the thought that went into it is also evident. All the components mount opposite the screen so it looks clean from the front and the components will not be subject to as much flexing and the inputs are in the same place as a traditional Arduboy.

cost = low, practicality = extremely low, customer service problems = high

     ~[Kevin Bates]

These flexible circuit boards use a polyimide substrate, the same stuff as Kapton tape, and ordering boards is getting cheaper so we can expect to see more of them popping up. Did we mention that we currently have a contest for flexible circuits? We have prizes that will make you sing, just for publishing your flex PCB concept.

[Thank you for the tip, c00p3r]

While you might see a CRT by the side of the street and think noting of it, Ryan Mason has come up with a novel use for five of them in a row called the Cathode MK1.  

This set uses the Unity game engine along with an Arduino board to spread games across five tube TVs arranged side-by-side. 

In order to keep project costs down, Mason’s gaming rig is restricted to displaying a game signal on one TV at a time. This makes gameplay even more interesting, especially considering that the way that each TV handles a loss of signal contributing to the experience. 

Several games are available for this unique system, including Long Pong AKA Pooooong, where a ball bounces from screen to screen as shown in the clip below.


Interactive video games take many forms, but for the most part, each player has a separate controller that manipulates an onscreen character, vehicle, or other singular element. What if, as in real life, multiple players have to work together with physical objects to control a sailing ship?

That’s the idea behind HOT SWAP: All Hands On Deck by Peter Gyory and Celment Zheng. In it, two players guide various parts of a ship using five different control elements. What makes this really interesting is that each player’s input device has room for two of these control elements, which must be swapped for actions such as steering and to load cannons. Input information is passed to the game via an Arduino Micro

It’s like if we took a regular game controller, popped off all of the inputs, and made it so you could only use a couple of them at a time. There are two controllers, with each consisting of two input slots. Each controller controls one side of the ship, port or starboard. There are five actions total in the game, each executed with a dedicated physical input: a crank to raise and lower the sails, a wheel for turning the rudder, a hatch for loading the cannons, a wick for firing the cannons, and a flame button for dousing the fire.

There is only one of each input, which makes them a shared resource that players must trade back and forth as they play. There is this old Milton Bradley kids board game from the ’90s called Perfection where players must fit shapes into holes before a timer is up and the board shakes to make everything pop out. HOT SWAP is like if Perfection had a screen attached and had a goal outside of putting shapes into slots.

All of the code is done with JavaScript and the library Three.js, which we bundle into a desktop application using Github’s Electron. The brain of the controller is an Arduino Micro, which mostly just passes data along.

The inputs are created with the Mechamagnets technique that Clement has been developing through his research; all 3D-printed in PLA with neodymium magnets embedded in them. The actual “hot swapping” is facilitated by pogo pins that line up with our custom PCBs for each input. Also, lots of chocolate croissants.

More details on the build are available via this interview as well as in the video below.

Hunt the Wumpus is a text-based survival/horror game developed in 1973. As such, it’s perhaps due for an update, and Benjamin C. Faure was able to do so using an Arduino Mega to run a graphical version on an 8×8 MAX7219 LED display.

The game consists of moving your character through the 64-LED randomly generated world, avoiding pits and bats, attempting to face the Wumpus to fire your one arrow. Navigation is aided by “wind” and “stench” lights, indicating either a pit or the foul Wumpus is nearby. The game is also enhanced with a few LED animations and a small piezo speaker. 

On startup, the game will generate an 8×8 map for the player that contains bats, pits, and a Wumpus. The player must pay attention to their senses to ensure they don’t fall into a pit or run into a Wumpus. Running into a bat might not be instant death, but they can carry you over a pit or even straight to the Wumpus.

If the player wishes to win, they must pinpoint the location of the Wumpus. Then, they must take one step towards the Wumpus (so that they are facing the proper direction) and fire their only arrow. If they hit the Wumpus, they win! If they miscalculated, however, they will meet a grisly fate.

A demo can be seen below, while code for the project is available on GitHub.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook