Video Game Talk The Place to talk about and trade Video & PC Games

How does a light gun work?

Old 08-02-02, 10:43 AM
  #1  
DVD Talk Legend
Thread Starter
 
Join Date: Oct 2000
Location: Cincinnati, OH
Posts: 10,059
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?
tofu is offline  
Old 08-02-02, 10:46 AM
  #2  
DVD Talk Limited Edition
 
Join Date: Jul 2000
Posts: 5,663
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.
asabase is offline  
Old 08-02-02, 12:31 PM
  #3  
DVD Talk Limited Edition
 
Join Date: Mar 2000
Location: Where the sky is always Carolina Blue! (Currently VA - again...)
Posts: 5,167
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
Tuan Jim is offline  
Old 08-02-02, 01:13 PM
  #4  
DVD Talk Limited Edition
 
Join Date: Jul 2000
Location: Cromwell, CT
Posts: 5,494
Is it true that a light gun won't work if your game system is hooked to a rear projection TV?
JaxComet is offline  
Old 08-02-02, 02:03 PM
  #5  
DVD Talk Ultimate Edition
 
Join Date: Apr 2001
Location: Kailua, HI
Posts: 4,795
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.
focker is offline  
Old 08-02-02, 02:03 PM
  #6  
DVD Talk Limited Edition
 
Join Date: Jul 2000
Posts: 5,663
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.
asabase is offline  
Old 08-02-02, 02:32 PM
  #7  
Banned
 
Join Date: Jan 2002
Location: Blu-Ray: We Don't Need No Stinkin' Petition
Posts: 6,677
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.
joshd2012 is offline  
Old 08-02-02, 02:35 PM
  #8  
DVD Talk Ultimate Edition
 
Dimension X's Avatar
 
Join Date: May 2002
Location: The unknown world of the future
Posts: 4,757
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.
Dimension X is offline  
Old 08-02-02, 02:46 PM
  #9  
Senior Member
 
Join Date: Aug 2000
Posts: 667
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!
tylerwillis is offline  
Old 08-02-02, 04:42 PM
  #10  
DVD Talk Legend
Thread Starter
 
Join Date: Oct 2000
Location: Cincinnati, OH
Posts: 10,059
cool. thanks for the answers. now i can shoot more zombies with a clear head.
tofu is offline  
Old 08-02-02, 05:02 PM
  #11  
DVD Talk Platinum Edition
 
~~ PAL ~~'s Avatar
 
Join Date: Jun 2000
Posts: 3,279
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?
~~ PAL ~~ is offline  
Old 08-02-02, 05:21 PM
  #12  
DVD Talk Gold Edition
 
Join Date: Feb 1999
Location: HB, CA
Posts: 2,601
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.
belboz is offline  
Old 08-02-02, 07:40 PM
  #13  
DVD Talk Limited Edition
 
Join Date: Jul 2000
Posts: 5,663
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.
asabase is offline  

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Thread Tools
Search this Thread

Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright 2018 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.