Main > Lightguns |
Lightgun Game |
(1/3) > >> |
Quacker Blaster:
I am in the works of creating a pc-based lightgun arcade game and am interested in knowing how arcade games detected where the player fired the gun. If someone could post or link to source code in C++ that i can implement into my game, it would be greatly appreciated. Sincerely, Quacker Blaster |
Howard_Casto:
How arcade games detected the lightgun would be irrelevant for your project. All pc-based lightguns show up as either a mouse, or a joystick. That makes for easy interfacing. The short of it is arcade lightgun games used a light sensor, a trigger and the natural timing of the monitor and the fact that crt screens draw from left to right, top to bottom, one pixel at a time. When the trigger is pulled, the game would draw the screen white. Since it turns white one pixel at a time (extremely rapidly) it timed how long it took from when the trigger was pulled until the light sensor detects white to figure out the x and y position on the monitor. You aren't going to be able to do this on a lcd. Eveen if you wanted to do it for a crt-based right the timing is so critical that you need a hard-ware based solution to keep track of it.... so yeah... just use pc guns. |
Quacker Blaster:
--- Quote from: Howard_Casto on February 06, 2013, 11:10:09 pm ---How arcade games detected the lightgun would be irrelevant for your project. All pc-based lightguns show up as either a mouse, or a joystick. That makes for easy interfacing. The short of it is arcade lightgun games used a light sensor, a trigger and the natural timing of the monitor and the fact that crt screens draw from left to right, top to bottom, one pixel at a time. When the trigger is pulled, the game would draw the screen white. Since it turns white one pixel at a time (extremely rapidly) it timed how long it took from when the trigger was pulled until the light sensor detects white to figure out the x and y position on the monitor. You aren't going to be able to do this on a lcd. Eveen if you wanted to do it for a crt-based right the timing is so critical that you need a hard-ware based solution to keep track of it.... so yeah... just use pc guns. --- End quote --- Thanks for the explanation and suggestion. Can you recommend any cheap PC-based light guns for me to try? All i could find while googling was this which is pretty expensive if all you want to do testing. Is this what it normally costs for a PC-based lightgun or can i find something better? Sincerely, Quacker Blaster |
Howard_Casto:
Your link is invalid. A pc lightgun is going to cost around 50 to 100 bucks. There are cheaper alternatives, but be prepared for headaches..... guns made for the wii are rather cheap but we still have interface issues with them. |
BadMouth:
Real light guns aren't made anymore due to the decline in CRTs. :'( The most popular IR guns are: Aim-Trak http://www.ultimarc.com/JShopServer/section.php?xSec=7&xPage=1&jssCart=c5b9c013c87d0c84ea03b1d6dfbdd498 For testing, you can just buy the electronics. You'll need a couple switches to attach. The same guts are also sold with different shells at www.arcadeguns.com This is the most hassle free of current options. EMS Top Gun 3: http://www.amazon.com/EMS-Wireless-Display-Including-Projectors/dp/B0073X8MR0/ref=sr_1_1?ie=UTF8&qid=1360245540&sr=8-1&keywords=pc+light+gun Like Howard said, wii controllers can be made to work (search this forum for wii glovepie scripts), but pairing them can be a PITA and I actually get the blue screen of death half the time when I try to pair a second one. What sucks about light gun game nowadays is that the IR guns aren't accurate enough to use the sights on the gun, so you must have on-screen crosshairs (like a wii game). The old CRT guns were accurate down to a pixel. |
Navigation |
Message Index |
Next page |