Duck Hunt question

Geosurface

Diamond Member
Mar 22, 2012
5,773
4
0
I had an NES back when I was like 6 or 7, and I never played much Duck Hunt but there is something I've never understood...

how did that gun work?

Obviously I know how my PS3 House of the Dead game works with the camera and the light ball guns... the camera is seeing the balls that are lit up and tracking their movement, and comparing that to a calibrated matching map of the screen in game to determine where the shot hits.

How did the gun work for Duck Hunt? How did the system know where it was aimed?
 

cmdrdredd

Lifer
Dec 12, 2001
27,052
357
126
The zapper received light through a photodiode and used that to determine what part of the screen you were pointing at. When you pulled the trigger the screen went dark (looked like it flashed). That's when the it began receiving information. Then the NES would flash a solid white block around the ducks you are supposed to be aiming at at the same time. The photodiode detects the difference in light intensity between the black screen and the white hit boxes. So if you aimed at the right spot it will register as a hit.

Nintendo's patent is below. The last sentence is significant because this was the first light gun that could not be fooled. You used to be able to hold the gun pointed at a lamp and it would always register a hit in older versions.

Video target control and sensing circuit for photosensitive gun

Inventor
Okada, Satoru

Assignee
Nintendo Co., Ltd.

Application
No. 07/069801 filed on 06/10/1987

US Classes:
463/5, 345/156, 382/313, 434/20, 434/22

Examiners
Primary: Lastova, MaryAnn Stoll

Attorney, Agent or Firm
Jackson; Larry A.

International Classes
A63F 13/04 (20060101)
A63F 13/02 (20060101)

A television game apparatus according to this invention reads white picture data from a program ROM (6) to transfer it to a video RAM (8) and displays, on a television monitor (11), the white picture data, together with target or other data read from a character ROM (9). When a pistol (4) is leveled at a target on the screen of the television monitor (11) and the trigger is pulled, a switch (44) is closed to produce a trigger signal, on the basis of which black picture data is read from the program ROM (6) and displayed on the television monitor (11). Immediately after the black picture was displayed, the white picture is displayed in the next frame in the position where the target was displayed just before and/or around the periphery thereof. The light from this white picture is detected by a phototransistor (41), whose detection signal, when extracted by a filter (45, 46), is used as a detection signal from the target. Thus, there is no danger of mistaking the light from an illuminator for the light from the target.
 
Last edited:

smackababy

Lifer
Oct 30, 2008
27,024
79
86
Nintendo's patent is below. The last sentence is significant because this was the first light gun that could not be fooled. You used to be able to hold the gun pointed at a lamp and it would always register a hit in older versions.

I did not ever think you to try and trick a light gun with a lamp. >_>
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
I did not ever think you to try and trick a light gun with a lamp. >_>

Kinda like the arcade shooters that required you to shoot off screen to reload... just put your hand in front of the gun. Some people were a lot faster that way.
 

mmntech

Lifer
Sep 20, 2007
17,501
12
0
Sadthe light gun does not work with flat panel displays. LCD anyway. Playing Killzone with the Move is a lot less satisfying.
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
There is a timing factor with the graphics chip counting pixels and scanlines. I don't recall if NES did this for two ducks or used successive frames. That would place a limit on number of targets due to prolonged flicker.

Main reason it doesn't work due to the use of framebuffers and scalers in flat panels, and the obvious like light output. Bottom line for NES is flat panels are not real time. By the time the gun sees the image, if it even can, the NES is already back to drawing regular frames and has registered the miss. Even the fastest panels are always at least one frame behind because nothing is sent to the panel until one whole frame exists in the framebuffer.

A modern light gun would have to be similar to a digital camera and require quite a bit of image processing DSP built in and be able accommodate non real time display.
 
Last edited:

mmntech

Lifer
Sep 20, 2007
17,501
12
0
A modern light gun would have to be similar to a digital camera and require quite a bit of image processing DSP built in and be able accommodate non real time display.

That's basically how the Playstation Move works. It uses a camera to track the glowing ball on the end of the remote. Similar to professional motion capture. Wiimote uses a light bar on the TV to locate where the remote is pointing. Kinect works on some kind of dark magic. ^_^

The problem with camera based light guns is they need a lot of space. They're far more accurate though.
 

exdeath

Lifer
Jan 29, 2004
13,679
10
81
That's basically how the Playstation Move works. It uses a camera to track the glowing ball on the end of the remote. Similar to professional motion capture. Wiimote uses a light bar on the TV to locate where the remote is pointing. Kinect works on some kind of dark magic. ^_^

The problem with camera based light guns is they need a lot of space. They're far more accurate though.

Kinect is just a digital camera and a secondary camera and a laser that sweeps the play area at low frequency to paint a depth map.

The rest is all software algorithms same as optical mice and missile trackers.

The technology and especially image recognition algorithms with stuff like Kinect have been around for decades in IR trackers.
 
Last edited:

slugg

Diamond Member
Feb 17, 2002
4,723
78
91
That's basically how the Playstation Move works. It uses a camera to track the glowing ball on the end of the remote. Similar to professional motion capture. Wiimote uses a light bar on the TV to locate where the remote is pointing. Kinect works on some kind of dark magic. ^_^

The problem with camera based light guns is they need a lot of space. They're far more accurate though.

You're right in your statements, except you're kinda missing one key concept; what exdeath was saying (and which I agree with), if you were to make a modern day "Zapper," it would have to have a camera inside of the controller itself capturing the TV screen. Playstation Move involves a camera external to the controller that captures the controller. ;)

Kinect is just a digital camera and a secondary camera and a laser that sweeps the play area at low frequency to paint a depth map.

The rest is all software algorithms same as optical mice and missile trackers.
I have no idea where you got your information, but Kinect has nothing to do with lasers or algorithms similar to those in optical mice and missile trackers.


The technology and especially image recognition algorithms with stuff like Kinect have been around for decades in IR trackers.
Vague statement. Yes, some algorithms are old, but others are new. The algorithms *inside* the device are old. The stuff handled by the API/Drivers is pretty new. Microsoft turned many heads when they published their work on their skeletal tracking algorithm. At the time, it was incredible and fresh.


How Kinect actually works (in a nutshell):
The Kinect consists of a color camera and an infrared camera. The IR sensor is rigidly paired with an IR diode covered by an aperture grille, separated by some known distance to create parallax. When the diode shines through the grill, a pattern of thousands of dots are projected into the scene. The IR sensor detects these dots and computes parallax based on the distortion of the projected light pattern. For areas without dots, the device interpolates intermediate data. With this, a parallax-map is made. The parallax-map then undergoes a perspective reprojection transform into the color camera's coordinate system - a process known as registration. At this point, the Kinect has now generated a color frame with depth information. It does this 30 times per second.

Technically, the device itself does not measure distance; it only yields a parallax measurement. The host machine (PC, Xbox 360, etc) converts the parallax to distance if needed. The MCU on the Kinect comes pre-calibrated from the factory with a generic calibration, including everything it needs to do the registration. This is the same reason why each individual Kinect gives different readings (generic calibration + manufacturing variance). At a scientific level, it's horribly inaccurate and noisy. But for a lot of other applications, including gaming, it's a cheap sensor that gets the job done fairly well.

If there's anything else you guys would like to know about Kinect, feel free to ask. I may or may not have R&D'd calibration and registration algorithms for it... ;)
 
Last edited: