Introduction: FPS Arcade Style Gun
this is my instructable of how to make an arcade style gun for FPS pc games.
I often play computer games through the home theater setup (it just seems more fun louder and bigger). and i thought it would be pretty cool if i could play games like HL2 and Deus Ex through an arcade style gun.
The outlines for the gun are:
+ it must be able to control both the walking and looking of the game (keyboard & mouse)
+ must have many other functional keys (space enter pause ect..)
+ relatively accurate
+ decent range from computer
+ cheap and simple
Stuff you will need:
+ an old (working) usb keyboard & mouse
+ various buttons, toggle switches and LED's (infrared) of your choice
+ an old web cam (working)
+ long cable containing 8 or more wires (sata will do)
+ various materials (wood, plastic,metal ect)
Step 1: Planning.
to have various keys on the gun i plan to take apart a keyboard and map out the connections for later use. the walking function will be controlled by the thumb using a small mounded joystick controlling the W,S,A and D keys. other keys will be accessible through button panels and toggle switches mounted around the gun.
as far as clicking scrolling and more clicking I will once again be taking apart an old usb computer mouse and wiring it to various switches around the gun. most of the mouse functions will be situated around the trigger finger and the trigger will of-course be a left click.
but the mouse has another function in FPS games, and that is to look around. and since the gun will be moving through the air there isn't many physical ways to interface the movement of the "gun" with the computer. I considered using an accelerometer mouse but that all gets a little complicated and expensive. so instead I chose to use my old web cam and some software (robo realm) to create a mouse like function by tracking an LED.
here are some photos of sketches and ideas i had before building the gun.
Step 2: Frame
when constructing the frame it is important to keep ergonomics in mind as you will be holding the device for long periods of time. Also consider the placement of button panels and the accessibility of them.
I constructed my trigger handle out of some F27 hardwood (not the lightest choice of material). I then welded up a frame out of some bits of steel to hold all the parts together. I then cut out another piece of wood for the LED mount in the fount of the gun.
When constructing a device like this it is always important to keep in mind the assembly; otherwise you could end up with screws you can't reach and nuts in thigh corners ect.
Step 3: Trigger & Joystick
I cut my trigger from a thick sheet of aluminum and mounted it on a piece of Plexiglas. this allows me to put a spring on the trigger so i can now have different trigger strengths. this interface will be the primary click of the taken apart mouse.
when creating the joystick it is important to keep in mind where it is going to be placed, then shape it accordingly. I used 4 roller switches for a smooth function and a piece of threaded rod with a spring and some bolts to hold it all together. the spring helps the stick center itself as do the roller switches.
Step 4: Button Pannel's
when playing games there are may auxiliary functions such as flashlight, use object, scope.. ect. Is is important to include an external button panel for use by your free hand.
there are many was to do this and I guess it really depends on your design. I chose to go for a traditional color coded panel like in some console controllers. I used a sheet of aluminum to hold it all together. I made this part so that it wasnÃ¢â¬â¢t permanently connected to the frame, so I could detach it for wiring and repairs.
Step 5: LED's and Webcam
This part of the gun will vary depending on the environment you use the gun in. the software will track a color and convert its movement into mouse movement; for example I usually use a blue LED but if I use it in a room with blue objects in front of the camera it can get somewhat confused and glitches violently. To compensate for this I also put some infrared LED's and through a simple selection switch I can choose which light will best suit the environment of use. You should also try a variety of different LED's brightness's, if you use an LED to bright it can reflect under the webcam and other parts of the room also confusing the system. I ended up using two bright (not super bright) 160ÃÂ° Blue LED's which work nicely.
This step is only necessary if you want to use infrared LED's you could always just have many different colors to choose from, and that way you wouldn't have to change your webcam. But I used infrared anyway. To convert your webcam to infrared simply take it apart and look around for the filter. If you're lucky it's a fat little slice of glass you can just pull out. But since webcams are usually pretty small they seem to just print the filter on the inside of the lens. I used a Dremel brush to scrape off the printed filter.
It doesn't really matter how you do this part, just as long as your LED's end up facing forewords and can have a pretty good spread of light.
Step 6: Mouse!
this part is fairly simple. just take apart your USB mouse and make connections from the various switches and connect them to the controls you want (Eg: left mouse click to trigger ect...). you should probably still use the scroll wheel since it is fairly important to have when your playing to scroll through weapons. i situated all my mouse buttons around the trigger finger and made them easily accessible.
Step 7: Keyboard Mapping
If you don't have a continuity tester (like me) i recommend building one since it will save you so much time through this part. First you should decide what keys you want and what switches and buttons on the gun they will control. then crack open a USB keyboard and you should find that there is just a small and simple looking circuit up in the top right corner which connects to two floppy sheets of circuit covered in buttons and wires. peel the two apart but be careful not to tare them. then once you've got these three parts look at what keys lay on top of these buttons and write it on the circuit with permanent marker for later reference (see picture FILL IN !!!!). then draw an illustration of the hard circuit board on a piece of paper (all pins included).
you are probably going to want to get some calm music going cause this usually takes a while
i recommend Pink Floyd dark side of the moon. Start with the first flexible layer of circuit and use you continuity tester to find which key connected to what terminal on the board (confused? the pictures should help) then when found mark it down on your illustration of the hard circuit board. then do the second layer. you will by now have noticed that the layers are somewhat different criss crossing the circuit together but if you draw it down simply on your circuit map you should have no troubles.
Step 8: Assembly
put it all together!
hopefully all your bits will fit together nicely without too much troubles. i have saved this step until after most of the circuitry so that you can make any last minute adjustments for fit them in your design, you should also consider where your wires are going to run.
photo #1 = frame
photo #2 = frame + led face + mouse circuit
photo #3 = frame + led face + mouse circuit + trigger & joystick part
Step 9: Wiring
connect it all up!
some parts of the gun might have to be removed to allow soldering accessibility or to thread wires through. you will find that by now its becoming a maze of wires but don't worry they can all be organized after the soldering. connecting them all to the keyboard circuit should be simple now that you have drawn the map!
Step 10: Testing & Programing
don't worry, its simple..
go to the robo realm website and download the free software. once you've done that download the attached file and test it out with your gun. chances are it will be fairly sensitive since this is still a rough program but games are still fun to play through the gun (especially snipering since it seems so realistic). ill post up an improved program once i get it perfect.
nubie kindly suggested using freetrack, its allot more simple and user friendly.
Step 11: Have Fun!
have fun with your new arcade style computer controller. now you can play your favorite games on TV and not have to own a console.
here are some pics of the end product!
Participated in the
The Instructables Book Contest