Main > Main Forum
How does a Light Gun Work?
NoOne=NBA=:
I haven't actually seen it done, but my guess would be that you have to move the gun to the edges of the screen during calibration.
I'm not sure if there is a calibration screen, or not, during that time.
If there is, it would be a simple matter of the gun following the calibration pattern, and showing the cursor movement at a specified interval.
It may also track the cursor USING the cursor, and keep trying to "recenter" the cursor to the sensor in the gun until it bumps the edge of the screen.
At that point, the cursor wouldn't move any farther, but the gun would continue to register it as off-center, showing the gun where the edge of the screen is.
JustMichael:
A lightgun works by seeing light from the screen. Let me explain how the screen is drawn then how the computer figures out where the gun is pointing. The screen starts out blank. The scanning beam then draws a single line from the top left corner to the top right corner of the screen. The beam then shuts off and drops down 1 line and goes back to the left. It then turns on and draws the new line (which is right below the first line). This pattern is repeated until the whole screen is drawn. Once the whole screen is drawn, the scanning beam shuts off and goes back to the top left corner to draw the screen again. The computer can figure out where the lightgun is pointing by taking the difference in time from when the screen started drawing to when the lightgun saw the light. I hope this makes it clearer.
lokki:
Suprised no one mentioned
http://entertainment.howstuffworks.com/question273.htm
Also the following helps
http://www.madsci.org/posts/archives/may2000/957879152.Cs.r.html