![]() |
How does a light gun work?
This question popped into my head as I was blasting away zombies on House of the Dead. I'd imagine that the gun works the same way as a controller does, feeding back coordinates on the screen into the console. Is the light in a light gun actually used for anything or is it just for show? And how does the gun know the coordinates on the screen?
|
When you pull the trigger, the game flashes the TV screen white. The game can measure the time between when the trigger was pulled and when the gun sees the bright light and figure out which scan line the gun was pointed at (based on the time it takes for each scan line), giving you the coordinates.
|
Originally posted by asabase When you pull the trigger, the game flashes the TV screen white. The game can measure the time between when the trigger was pulled and when the gun sees the bright light and figure out which scan line the gun was pointed at (based on the time it takes for each scan line), giving you the coordinates. Tuan Jim |
Is it true that a light gun won't work if your game system is hooked to a rear projection TV?
|
Originally posted by asabase When you pull the trigger, the game flashes the TV screen white. The game can measure the time between when the trigger was pulled and when the gun sees the bright light and figure out which scan line the gun was pointed at (based on the time it takes for each scan line), giving you the coordinates. |
As long as the projection guns still scan the image line by line, I don't see why not. Only problem I see is the screen being too dark and the light gun not picking up the white image.
|
The way I remember the light gun working for Duck Hunt, was that when you pulled the trigger, whatever you were shooting at turned to a white box and everything else was black. That only happened for a split second, so I imagine that during that time, the gun detected if it could see the white dot on the black screen and if it could, you had a hit.
|
From http://www.howstuffworks.com/question273.htm :
Question How do light-guns work on a video game? How do they know where on the screen the gun is aiming to produce the correct explosion position in the game? Answer Most home video games and many arcade games use some sort of gun as an input device. You point the gun at the screen and pull the trigger, and if you hit the target on the screen, the target explodes. To create this effect, the gun contains a photodiode (or a phototransistor) in the barrel. The photodiode is able to sense light coming from the screen. The gun also contains a trigger switch. The output of the photodiode and the switch are fed to the computer controlling the game. At the same time the computer is getting signals from the screen driver electronics. If you have read How Television Works, you know about the horizontal retrace and vertical retrace signals used to align the picture on the screen. The screen driver electronics send pulses to the computer at the start of the horizontal and vertical retrace signals so that the computer knows where the electron beam is on the screen during each frame. The computer normally uses one of two different techniques to figure out whether or not the gun is pointed at the target when the user pulls the trigger: The computer blanks the screen and then paints just the target object on the screen (as a white object). If the photodiode senses darkness after one vertical retrace signal and then light after the next, the computer assumes that the gun is pointed at the target of the screen and scores a hit. The computer can blank the screen and then paint the entire screen white. It will take time for the electron beam to trace the entire screen while painting it white. By comparing the signal coming from the photodiode with the horizontal and vertical retrace signals, the computer can detect where the electron beam is on the screen when the photodiode first senses its light. The computer counts the number of microseconds that pass between the time the horizontal and vertical retrace signals start and the photodiode first senses light. The number of microseconds tells the computer exactly where the gun points on the screen. If the calculated position and the position of the target match, the computer scores a hit. |
My friends and I were discussing this the other day... I had to confess complete ignorance... had NO idea how the dadgum things work. Thanks for an informative answer! :)
|
cool. thanks for the answers. now i can shoot more zombies with a clear head.
|
Originally posted by JaxComet Is it true that a light gun won't work if your game system is hooked to a rear projection TV? |
The way that most light guns work requires that they synch themselves to the display. They assume standard NTSC signals and timings, so any display that deviates from that will cause light guns to not work. Many projection TV's (front or rear) nowadays aren't even CRT based so they dont' have scan lines, or they have a line-doubler. Some of the newer, HD ready, direct-view sets won't work properly with light-guns either because of this since they automatically line-double all video inputs.
|
Originally posted by focker That's not enough to make it work. There are plenty of different coordinates that would be equidistant from the gun and the light would take the same amount of time from each of these coordinates to get back to the gun. |
| All times are GMT -5. The time now is 12:47 AM. |
Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.