DVD Talk Forum

DVD Talk Forum (https://forum.dvdtalk.com/)
-   Video Game Talk (https://forum.dvdtalk.com/video-game-talk-15/)
-   -   How does a light gun work? (https://forum.dvdtalk.com/video-game-talk/226920-how-does-light-gun-work.html)

tofu 08-02-02 09:43 AM

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?

asabase 08-02-02 09:46 AM

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 08-02-02 11:31 AM


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.
Man, an explanation like that takes all the magic out of wondering what goes on. Kinda like finding out how babies are made.

Tuan Jim

JaxComet 08-02-02 12:13 PM

Is it true that a light gun won't work if your game system is hooked to a rear projection TV?

focker 08-02-02 01:03 PM


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.
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.

asabase 08-02-02 01:03 PM

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.

joshd2012 08-02-02 01:32 PM

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.

Dimension X 08-02-02 01:35 PM

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.


tylerwillis 08-02-02 01:46 PM

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! :)

tofu 08-02-02 03:42 PM

cool. thanks for the answers. now i can shoot more zombies with a clear head.

~~ PAL ~~ 08-02-02 04:02 PM


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?
I have heard this statement before and never had the chance to prove or disprove it. Does anyone know if this is a true statement?

belboz 08-02-02 04:21 PM

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.

asabase 08-02-02 06:40 PM


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.
Which points would those be? We aren't talking about the time it takes the light to travel from the screen through the air to the gun (essentially zero), but the time it takes to draw each scan line individually.


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.