How does a light gun work?
#1
Thread Starter
DVD Talk Legend
Joined: Oct 2000
Posts: 10,059
Likes: 0
Received 0 Likes
on
0 Posts
From: Cincinnati, OH
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?
#2
DVD Talk Limited Edition
Joined: Jul 2000
Posts: 5,663
Likes: 0
Received 0 Likes
on
0 Posts
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.
#3
DVD Talk Limited Edition
Joined: Mar 2000
Posts: 5,167
Likes: 0
Received 0 Likes
on
0 Posts
From: Where the sky is always Carolina Blue! (Currently VA - again...)
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.
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
#5
DVD Talk Ultimate Edition
Joined: Apr 2001
Posts: 4,795
Likes: 0
Received 0 Likes
on
0 Posts
From: Kailua, HI
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.
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.
#6
DVD Talk Limited Edition
Joined: Jul 2000
Posts: 5,663
Likes: 0
Received 0 Likes
on
0 Posts
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.
#7
Banned
Joined: Jan 2002
Posts: 6,677
Likes: 0
Received 0 Likes
on
0 Posts
From: Blu-Ray: We Don't Need No Stinkin' Petition
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.
#8
DVD Talk Limited Edition
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.
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.
#11
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?
Is it true that a light gun won't work if your game system is hooked to a rear projection TV?
#12
DVD Talk Gold Edition
Joined: Feb 1999
Posts: 2,600
Likes: 0
Received 0 Likes
on
0 Posts
From: HB, CA
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.
#13
DVD Talk Limited Edition
Joined: Jul 2000
Posts: 5,663
Likes: 0
Received 0 Likes
on
0 Posts
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.
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.




