Introduction: Shoot 'Em Up Game With Pneumatics & Wiimotes
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:
- Pneumatic circuit
- Electric circuit
- Extra targets
- Extra fun
Step 1: Create the Targets
- Pneumatic damper motor (~ $35): https://estore.industrialcontrolsonline.com/default.aspx?page=item+detail&itemcode=MP909D1441
- Mounting bracket: http://customer.honeywell.com/honeywell/productinfo.aspx/14003640-001
- Pneumatic linkage and bracket: (sorry, I got these through a friend and can't find a suitable link)
- 2x2 wood for the frame
- 1x2" wood to support the silhouette
- L brackets to create a hinge
- Black foam core board for the target silhouette
- Spare wood (trim works nicely) to hold the silhouette in place
- Outlaw face printout
- Wood screws
- Create an H frame base using 2x2s. Dimensions are approximately 1' x 2' (see picture).
- Using L brackets, attach a 2x2 that is just long enough to bridge the supporting 2x2s (see picture). Make sure that it hinges freely
- Attach the bracket to the 2' section of 2x2, with the linkage end facing towards the hinge side of the frame
- Attach the damper motor to the bracket.
- Attach the support bracket and linkage to the hinged 2x2 and pneumatic damper
- Attach a 1x2.5 (approximately 1.5 feet long) to the hinged 2x2 (see picture)
- Cut out a silhouette from the foam core board
- Print out a real Wild West outlaw's head and glue it to the silhouette. Here's an example head to use:http://www.franksrealm.com/Indians/Outlaws/Belle_Starr_1848-1889.jpg
- 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.
- 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:
- An air compressor (we used a cheaper one)
- A 110v air value (~$35): http://www.plccenter.com/Buy/ROBERTSHAW/R42720
- Roll of 1/4" tubing: http://www.plccenter.com/Buy/WATTS%20DRAINAGE/SPEB25
- Various 1/4" air hose connectors
- Air fitting with an 1/4" connector on one side
- Hook up the air fitting to the compressor
- Run 1/4" tubing from the air fitting to the NC port of the air value
- Run 1/4" tubing from the COM port of the air value to the pneumatic damper motor on the targets
Step 3: Set Up the Electric Circuits
Here's what you need:
- Phidgets 0/0/4 relay board: http://www.phidgets.com/products.php?category=9&product_id=1014
- 4 household electrical extension cords
- Electrical tape
- Wire connectors
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 = true;
To bring the target back down (when shot), merely set it to false;
Step 4: Configure the Wiimotes
To do this, you will need to do the following:
- Write a program that uses the Wiimotelib SDK: http://wiimotelib.codeplex.com/
- Write a database to store the X & Y boundaries of your targets
- Build your own infrared sensor that can be placed in your shooting gallery. I followed these steps: https://www.instructables.com/id/Yet-Another-DIY-Wii-Sensor-bar/
- Find some nice Wiimote gun attachments. I used the Perfect Shot: http://www.newegg.com/Product/Product.aspx?Item=N82E16878112013&nm_mc=KNC-GoogleAdwords&cm_mmc=KNC-GoogleAdwords-_-pla-_-NA-_-NA
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#
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
- 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
- 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.
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"
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
- Hide all of the objects in the basket and cover it in straw and then the cloth
- When a kid approaches, tell them to find a certain object
- They will root around to find it
- Tell them if they found it or not
- 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)
- Have the kid try to rope the horse by throwing the hoop around the horse
- Give them some candy when they win
Thar's a Snake in My Boot
- A boot
- Some plastic snakes
- Have the kids try to throw the snakes into the boot
- Give them some candy when they win
Step 9: Add a Singing Cowboy!
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!