Go Back  DVD Talk Forum > Entertainment Discussions > Video Game Talk
Reload this Page >

How does a light gun work?

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

How does a light gun work?

Thread Tools
 
Search this Thread
 
Old 08-02-02 | 09:43 AM
  #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?
Old 08-02-02 | 09:46 AM
  #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.
Old 08-02-02 | 11:31 AM
  #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.
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
Old 08-02-02 | 12:13 PM
  #4  
DVD Talk Limited Edition
 
Joined: Jul 2000
Posts: 5,494
Likes: 0
Received 0 Likes on 0 Posts
From: Cromwell, CT
Is it true that a light gun won't work if your game system is hooked to a rear projection TV?
Old 08-02-02 | 01:03 PM
  #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.
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.
Old 08-02-02 | 01:03 PM
  #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.
Old 08-02-02 | 01:32 PM
  #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.
Old 08-02-02 | 01:35 PM
  #8  
Dimension X's Avatar
DVD Talk Limited Edition
 
Joined: May 2002
Posts: 5,680
Received 510 Likes on 313 Posts
From: The unknown world of the future
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.
Old 08-02-02 | 01:46 PM
  #9  
Senior Member
 
Joined: Aug 2000
Posts: 667
Likes: 0
Received 0 Likes on 0 Posts
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!
Old 08-02-02 | 03:42 PM
  #10  
Thread Starter
DVD Talk Legend
 
Joined: Oct 2000
Posts: 10,059
Likes: 0
Received 0 Likes on 0 Posts
From: Cincinnati, OH
cool. thanks for the answers. now i can shoot more zombies with a clear head.
Old 08-02-02 | 04:02 PM
  #11  
~~ PAL ~~'s Avatar
DVD Talk Hall of Fame
 
Joined: Jun 2000
Posts: 7,617
Received 273 Likes on 230 Posts
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?
Old 08-02-02 | 04:21 PM
  #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.
Old 08-02-02 | 06:40 PM
  #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.
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.

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



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

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