About Light guns on the HYDRA
GooL91
Posts: 7
Hi!
I'm going to try to make a game using a light gun.
My question is what kind of gun I should use.
I have psx one, a GunCon 1, and a Nintendo one, although I don't want to disassemble the Nintendo one(NES).
I have about six of the psx ones so I can open one up if you'dlike...
Maybe someone can give some tips on which gun to use.
Link to the psx one.
http://www.videospider.tv/Videos/Detail/696729719.aspx
Post Edited (GooL91) : 2/12/2009 8:24:49 PM GMT
I'm going to try to make a game using a light gun.
My question is what kind of gun I should use.
I have psx one, a GunCon 1, and a Nintendo one, although I don't want to disassemble the Nintendo one(NES).
I have about six of the psx ones so I can open one up if you'dlike...
Maybe someone can give some tips on which gun to use.
Link to the psx one.
http://www.videospider.tv/Videos/Detail/696729719.aspx
Post Edited (GooL91) : 2/12/2009 8:24:49 PM GMT
Comments
The NES lightguns as I've read use the "extra" pins in the connector, not shifting out of the shift register like the buttons. While this might be an interesting project to undertake, it would certainly be more complex.
Reply to "Spork Frog"
Thank you for the answer. Is there any link that you could provide me with?
As for the pins, well, if you compare the GunCons with the Nintendo lightgun the 2 extra pins seem to be video. As the GunCon uses the yellow "RCA" for video. But thats just my guess.
Reply to "mpark"
I'll try to describe my undertandig of how they work. To my help I'll use the popular game for the nes, DuckHunt.
1. Objects appear on the screen, like ducks.
2. The player presses the button and the console is told that the button is pressed.
3. The whole screen becomes black.
4. Duck nr(n) becomes a white box.
5. The console checks if the gun sees a light.
- Repeat step 4 and 5 for every object until the console is told that the gun sees a light, or run out of objects in which case the game tells you that you missed all objects.
Funny, this technique is so slow that if you don't blink you'll see the black/white screen. Both on the nes and PSX. Although I'm not sure if it shows on the PS2...
Was that right?
I have another question. How does the console know where the gun points in menus? In some games you have a cursor in the menus or at the calibration screens.
Is the screen blinking at an FPS higher than 11 so we wont see it? Or is it some other interesting way, maybe compasses and accelerometres.
Post Edited (GooL91) : 2/13/2009 12:20:35 PM GMT
There's a psx controller object in the object exchange, I believe.
Some light guns rely on the electron beam of a CRT to find its position, though this is considerably more tricky to do, and usually requires direct coupling with the video hardware. On the Hydra this might actually work: basically, the theory is that when the scanning beam of the CRT refreshes a pixel, it becomes very slightly brighter for a short time. When the gun sees a pixel become slightly brighter, it asks the video hardware what pixel it was drawing at that time, which is the position of the light gun. The GunCon appears to do a more accurate but more hardware-complex design. If the information I am finding is correct, it seems to use a CRT-scanning method but interfacing directly to the video and analyzing that instead of looking directly at a CRT display, which confuses me because I don't know how that is supposed to work.
Accelerometers/gyros would work as well, with some careful calibration.
When I've coded for a Light gun, the reason the screen goes white is because to get the most accurate reading, you wait for the vblank, start a counter, some cause interrupts so you then read where the counter is, divide it by your counter value per line for your Y position, then the remainder is divided by the counter scaled for per pixel to get your X position. they use white.
As we don't have interrupts, ( unless it puts the light trigger on a seperate pin that you can do a waitpeq/ne with ) you'll just have to poll the joypad, but as it's quite slow polling, cos you have to read ALL those bits, your X resolution is going to be pretty poor.
Baggers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
Do you think you can get a pretty accurate x,y resolution with this method? I'd like to try it.
I doubt we can get a pixel accurate resolution!
flicker unless their backlight is powered by a low frequency inverter, which I've seen in cheap ones, even though it is easier
to make a high frequency inverter >1000hz not 60hz.
Cheers,
Jim.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
-Phil
There is some serious latency on newer TV's. Faster video processors help cut the numbers down some, but it won't ever be like a CRT was.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!