Light gun

Missing image
Super_scope.jpg
Super Scope, Nintendo´s light gun for the Super Nintendo

A light gun is a pointing device for computers and a control device for arcade and video games. The first light guns appeared in the 1930s, following the development of light-sensing vacuum tubes. It wasn't long before the technology began appearing in arcade shooting games, beginning with the Seeburg Ray-O-Lite in 1936. These early light gun games used small targets (usually moving) onto which a light-sensing tube was mounted; the player used a gun (usually a rifle) that emitted a beam of light when the trigger was pulled. If the beam struck the target, a "hit" was scored. Modern screen-based light guns work on the opposite principle -- the sensor is built into the gun itself, and the on-screen target(s) emit light rather than the gun. The first light gun of this type was used on the MIT Whirlwind computer.

The light gun, and its descendant, the light pen, are now rarely used as computer pointing devices, because of the popularity of the mouse and changes in monitor display technology -- light guns can only work with standard CRT monitors.


Contents

Light guns in video games

Missing image
Duck_hunt_screenshot.png

The video game light gun is typically modeled on a ballistic weapon (usually a pistol, but occasionally a shotgun, sniper rifle, or sub-machine gun) and is used for targeting objects on a video screen. With force feedback, the light gun can also simulate the recoil of the weapon.

Light guns are very popular in arcade games, but have never caught on in the home video game console market. This may be because people are reluctant to buy more than one extra controller for their system, let alone a special-purpose and often expensive peripheral, or because light guns are less satisfactory to use with the small television screens in peoples homes than on the large screens in arcade game cabinets.

The most popular example of the light gun is Nintendo's Zapper gun for the Nintendo Entertainment System, though there are also light guns for Sony PlayStation, Sega Dreamcast, Magnavox Odyssey and many other console and arcade systems.

How light guns work

The "light gun" is so named because it uses light as its method of detecting where on screen you are targeting. The name leads one to believe that the gun itself emits a beam of light, but in fact all light guns actually receive light through a photoreceptor diode in the gun barrel. The diode uses light reception to do its targeting, in conjunction with a timed mechanism between the trigger of the gun and some rather smart graphics programming.

There are two versions of this technique that are commonly used, but the concept is the same: when you pull the trigger of the gun, the screen is blanked out to black, and the diode begins reception. All or part of the screen is painted white in a way that allows the computer to judge where the gun is pointing, based on when the diode detects light. The user of the light gun notices nothing, because the period in which the screen is blank is very short.

Method one

The first detection method, used by the Zapper, involves drawing each target sequentially in white light after the screen blacks out. The computer knows that if the diode detects light as it is drawing a square (or after the screen refreshes), that is the target the gun is pointed at. Essentially, the diode tells the computer whether or not you hit something, and for n objects, the sequence of the drawing of the targets tell the computer which target you hit after 1 + ceil(log2(n)) refreshes (one way to determine if any target at all was hit and ceil(log2(n)) to do a binary search for the object that was hit).

An interesting side effect of this is that on poorly designed games, often a player can point the gun at a light bulb, pull the trigger and hit the first target every time. Better games account for this by not using the first target for anything.

The second method, used by the Super Nintendo Entertainment System's Super Scope and computer light pens is more elaborate but more accurate.

Method two

The trick to this method lies in the nature of the cathode ray tube inside the video monitor (it does not work with LCD screens, projectors, etc.). The screen is drawn by a scanning electron beam that travels across the screen starting at the top until it hits the end, and then moves down to update the next line. This is done repeatedly until the entire screen is drawn, and appears instantaneous to the human eye as it is done very quickly.

When the player pulls the trigger, the game brightens the entire screen for a split second, and the computer (often assisted by the display circuitry) times how long it takes the electron beam to excite the phosphor at the location the gun is pointed at. It then calculates the targeted position based on the monitor's horizontal refresh rate (the fixed amount of time it takes the beam to get from the left to right side of the screen).

Detection

Once the computer knows where the gun is pointed at, it can tell if it coincides with the target or not. However, many guns of this type (including the Super Scope) ignore red light, as red phosphors have a much slower rate of decay than green or blue phosphors.

A game that uses more than one gun reads both triggers continuously and then, when one player pulls a gun's trigger, the game polls that gun's diode until it knows which object was hit.de:Lightgun

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools