Shoot 'Em Up Game With Pneumatics & Wiimotes

Introduction: Shoot 'Em Up Game With Pneumatics & Wiimotes

About: I'm a hired gun programmer, usually regulated to building data-driven web sites. Come Halloween, I unleash my inner gearhead and build wild, interactive games that include both software and hardware in new an…
Use pop-up pneumatic targets and Wii remotes to create a shoot 'em up game.

Each year, my family creates a completely new and exciting display for Halloween. It has only a few goals: that it be interactive for the kids, that it offer the opportunity to work with new technologies, and that it be fun.

This year, the kids arrived to trick-or-treat only to be drafted as deputies in Grimy Gulch, an old west town. Grimy Gulch has been overrun by a gang of outlaws led by Black Bart, a cowboy of an exceptionally evil nature.

Black Bart and his gang were targets that would pop-up via pneumatic damper motors. The kids would "shoot" at the gang using Wiimotes. Laptops would communicate via network to coordinate which target would pop up and down.

This Instructable will cover these areas:
  • Targets
  • Pneumatic circuit
  • Electric circuit
  • Wiimotes
  • Game
  • Extra targets
  • Extra fun

Step 1: Create the Targets

To create one target, you will need the following supplies, pardner:
  1. Create an H frame base using 2x2s. Dimensions are approximately 1' x 2' (see picture).
  2. Using L brackets, attach a 2x2 that is just long enough to bridge the supporting 2x2s (see picture). Make sure that it hinges freely
  3. Attach the bracket to the 2' section of 2x2, with the linkage end facing towards the hinge side of the frame
  4. Attach the damper motor to the bracket.
  5. Attach the support bracket and linkage to the hinged 2x2 and pneumatic damper
  6. Attach a 1x2.5 (approximately 1.5 feet long) to the hinged 2x2 (see picture)
  7. Cut out a silhouette from the foam core board
  8. Print out a real Wild West outlaw's head and glue it to the silhouette. Here's an example head to use:
  9. Attach the silhouette to the hinged 2x2 using wood screws mounted through trim. The trim helps keep the foam core from tearing off of the screws when the targets pop up and down.
  10. Attach the top of the silhouette using trim and screws to the wood attached in step 6 above.

Step 2: Set Up the Pneumatic Circuits

The pneumatic circuit receives an electronic signal and sends air to the pneumatic motor detailed in step 1. When an 110 volt charge is applied, air will be sent to the pneumatic motors and the targets will pop up. When the voltage is stopped, air will release, and the target will drop.

To set up one pneumatic circuit, you will need the following: Steps:
  1. Hook up the air fitting to the compressor
  2. Run 1/4" tubing from the air fitting to the NC port of the air value
  3. Run 1/4" tubing from the COM port of the air value to the pneumatic damper motor on the targets
To add additional values (for more targets), you can set up a manifold of hoses and connectors (see picture). We had nine set up (we only used 7).

Step 3: Set Up the Electric Circuits

Next up, you need to route electric to the air values and make them controllable by computer via USB. As in the past, I like to use the rig that I made using a Phidgets 0/0/4 board.

Here's what you need: I followed the instructions on this web site here to create the devices. I'm not going to recreate the instructions that he laid out so well there.

Once in place, to send a command to a pneumatic target, all you have to do is turn on that electrical circuit (in C#, after adding references to the PhidgetsLib, etc):

ifOutput.outputs[0] = true;

To bring the target back down (when shot), merely set it to false;

Step 4: Configure the Wiimotes

To allow the kids to shoot at the targets, you can use Wiimotes. The Wiimotes work as Bluetooth devices that you computer can communicate with. The Wiimotelib SDK can work between your Wiimotes and your computer game that you write. The Wiimotes require an infrared source for reference (typically what the Wii Sensor Bar provides), so you will have to build your own.

To do this, you will need to do the following: Once I wired up the Wiimotes to my C# program, I wrote a program that would allow me to define where in my driveway each target would be. I set it up so that I could go into "Learn Mode", define each target, press the A button on my Wiimote to define the upper-left coordinates of the target and B to define the lower-right. This would allow me to arrange the targets however I wanted and not have to hard code any coordinates in the game itself. Very handy. See the pictures below for a visual.

BTW, I'm not sure if there is a limit to the number of Wiimotes you can connect. Last year for my spy game, I had four. This year I could only attach 3 for some reason.

Step 5: TIP: Configure Your Wiimotes and Targets a Night or Two Before Halloween

The Wii sensor bar is essentially just an array of infrared LEDs. The Wiimotes key off of infrared light to orient itself and send location information to the game computer. The sun has a lot of infrared light in it, so you can't easily configure your Wiimotes during the day.

I set my targets up the night before (without the silhouettes on them) and saved the locations to the database. I then marked the target locations on driveway with sidewalk chalk. I got weird looks from passersby (though they are quite used to this type of sight at my house).

I ended up tweaking the locations slightly on Halloween day, but that wasn't a big deal.

Step 6: Program the Game in C#

A self-employed programmer by trade, I love working on my Halloween displays as they give me a chance to work with technologies to which I don't usually have access in the business world. If only I could paid for this...

Anyway, I wrote the game in C#. It serves several functions:
  • Manages the flow of the game
  • Receives signals from the Wiimotes to determine which kid shot which target
  • Sends signals to the targets (via networked computer) to tell them to move up or down, based upon the signals from the Wiimotes
  • Keeps track of the scores of each player
  • Establishes the mood and context of the game via graphics, videos, and music
Here is the general flow of the game:
  • A "Wanted Poster" greets the kids as they arrive in my driveway.
  • I give them a spiel about need their help fighting Black Bart and his gang who are on their way into town
  • Each kid registers by pulling the trigger on their guns once
  • A video showing the game entering the town is projected onto the garage door
  • One of 10 different Western movie or TV show themes plays
  • Once the video stops, the targets pop up and the kids shoot at them
  • When a target is shot, it falls down and is respawned some random few seconds later.
  • As they shoot, score is kept on which target each kid shot and an overall reward is shown as well
  • After a minute, a timer in the game goes off and ends the game.
  • The kids have 10 seconds to review their scores.
  • After 10 seconds, it returns to the wanted poster.
As the kids shot the targets, the scoreboard projected on the garage door would show which kid shot which outlaw how many times. It would also show their final reward earned in dollars.

Video to Establish Context:
This is video helped establish context for the game. Once the kids registered their guns to start the game, this video would play before the targets popped up to be shot.

Step 7: Create Non-scoring Targets to Add to the Chaos

To add some additional flavor to the game, we added some additional, non-scoring targets. We had a couple extra electrical and pneumatic circuits and decided to whip some cool things for the kid to shoot at.
  • A trough of water that would shoot water in the air when "bullets" hit it.
  • One of the lights above my garage could be shot out
  • A spittoon that would ping when shot
To set this up, we ran a 1/4" hose from one of the air valves and split it into 2 hoses. In a trough, we put two old car brake discs rotors to hold these hoses under water an inch or two. When you fill this up with water and send a quick jolt of air to it, water shoots up 3 feet or so as if being shot by a stray bullet.


Garage Light:
One of my garage lights happened to be the playing field, so I took the light bulb out, ran a socket up and placed it in the glass lantern, and ran that cord down to a 110v circuit. When the game sensed a shot into that target area, it would play a glass breaking sound and turn that circuit off.

I happened upon a crappy metal vase and thought that it would be a cool spittoon. I suspended a fan motor in it with a piece of coat hanger to serve as a hammer. When it gets shot, the intent was for it to ping as it were being hit with a bullet. I say intent, because I ran out of time to finish that prop, it would've been cool.

Step 8: Add Other Games for Additional Fun

My wife is great at coming up with fun sideshow games related to the theme for the year. This year, she had three:
  • "Find the Varmint"
  • "Lasso the Filly"
  • "Thar's a Snake in My Boot"
Find the Varmint
This was a popular game with the younger kids. For this game, you will need the following:
  • A basket
  • A piece of cloth to cover the basket (cut a hole big enough for the kids to fit their hands in but not big enough to see everything)
  • Some straw
  • Some objects to find
Running the game:
  1. Hide all of the objects in the basket and cover it in straw and then the cloth
  2. When a kid approaches, tell them to find a certain object
  3. They will root around to find it
  4. Tell them if they found it or not
  5. Give them some candy when they win

Lasso the Filly
Get the following supplies:
  • A hula hoop
  • A stuffed animal horse, about 2 feet long
  • Something to put the horse on (we used a bale of straw)
Game play:
  1. Have the kid try to rope the horse by throwing the hoop around the horse
  2. Give them some candy when they win
Could use an actual lasso too.

Thar's a Snake in My Boot
  • A boot
  • Some plastic snakes
Game play:
  • Have the kids try to throw the snakes into the boot
  • Give them some candy when they win

Step 9: Add a Singing Cowboy!

A friend with whom I jam occasionally agreed to be our singing cowboy. He learned 10 or so cowboy songs and played for the kids as they walked by. He added some nice flavor to the mix. Yee haw!

Step 10: Costumes

When developing a display like this, we try to find themes that are rich in context, so you can add lots of elements and details to make it more cool and more unified. Cowboys have a rich tradition in history and culture and lend themselves well to this sort of theme.

We love the frequenting the Lansing Civic Players Costume Shop for rental of our gear. Check for similar sources locally.

Step 11: Shout Outs for the Shootout!

So many to thank:

Todd Wilson and Mike Scott for the pneumatic engineering help, build assistance, gear procurement, and noob wrangling. I learned a lot from you dudes, thanky kindly. BTW, I didn't release any factory installed smoke this time.

Jerry Jodloski for the PA gear and lights, as well as kicking in and helping set some stuff up at the last minute. Glad you are back in the game with your own display, dude!

Kris Johnstone for the use of your trough.

Tim Roberts for the air compressor and most importantly, the long ethernet cable!

Most importantly, Kristi and Zack for your hard work and for putting up with the stress. We are a great team and we pulled it off again!

Halloween Decorations Challenge

Second Prize in the
Halloween Decorations Challenge

Hack It! Challenge

Participated in the
Hack It! Challenge

4th Epilog Challenge

Participated in the
4th Epilog Challenge

Be the First to Share


    • Raspberry Pi Contest

      Raspberry Pi Contest
    • One Board Contest

      One Board Contest
    • Fix It Speed Challenge

      Fix It Speed Challenge



    10 years ago on Introduction

    very clever. It looks fun was had by everyone. I bet your house was a hit at Halloween.


    10 years ago on Introduction

    Very, very cool. What a great treat for the kids, and for you being able to give them memories they won't forget!


    10 years ago on Introduction

    You outdid yourself again this year. So impressive!