How did Duck Hunt for the NES know where you were pointing the gun?

344 views

How did Duck Hunt for the NES know where you were pointing the gun?

In: 7118

12 Answers

Anonymous 0 Comments

When you pull the trigger the screen goes completely black, and after a white box appears where the duck is. The light gun is just a light detector. It looks at the black screen and if it sees the white box after is registers it as a hit and the duck dies. This process happens in less than a second so you may not notice it without looking for it.

Anonymous 0 Comments

So everyone commenting about the gun just being a light detector is right, but they took it a step further in later light gun games.

For example, take something like point blank on the PS1.

You pull the trigger, the screen goes black. The screen then goes fully white, but older screens didn’t light up all at once.

I am not sure specifically but lets just say they lit up one pixel at a time left to right, top to bottom.

The gun would time how long it took between pulling the trigger and detecting a white pixel. It would know, based on a calibration, how long it took to light the screen up to any given point. So it knew where on the screen it was pointing.

That’s why the light guns don’t work on newer screens, because they don’t light up progressively.

It was very effective, I’ve not been able to find anything that works quite as well on modern screens despite all the advancements we’ve made in motion tracking etc.

Anonymous 0 Comments

The gun have a light sensor which is able to see the brightness of whatever you are pointing at. When you push the trigger the screen will momentarily flash a test pattern. The hitbox would be white and the rest of the scene would be black. By reading the data from the light sensor the NES is able to determine if you points at the hitbox or not.

Anonymous 0 Comments

[removed]

Anonymous 0 Comments

The gun in the NES used by duck hunt was a civilian/consumer implementation of the revolutionary innovation known as a “[light pen](https://en.wikipedia.org/wiki/Light_pen)” which was initially developed by IBM for the [SAGE air defense system](https://en.wikipedia.org/wiki/Semi-Automatic_Ground_Environment) in the late 1950s, allowing radar operators to point to a spot on the screen and identify a specific radar target (SAGE only lasted a few years before NORAD went into service, but its a fascinating internet rabbit hole to go down if you’re interested in tech, as a number of innovations eventually made their way into consumer hands decades later – a single one of the 30 blockhouses was equivalent in performance to an 80286 computer, which was *insane* in 1958)

Because the computer is generating the image, it knows where in the scan process the electron beam in the display is at any given moment, the gun/pen is focused on a small area of the screen, pulling the trigger switch tells the computer exactly what part of the screen it’s aimed at, because the spot the beam is at is significantly brighter, relying on the phosphor to keep the image visible until the next pass of the beam, 1/29.97th of a second later. If the requisite pulses are all lined up with the software/ROM logic, that then correlates to an object (such as a duck, or an incoming Soviet aircraft) additional processing is then triggered. Otherwise it registers as a miss.

Because modern LCD displays don’t use a scanning electron beam to make the image, this approach no longer works, which is why you can’t play Duck Hunt on a modern TV/display.

Anonymous 0 Comments

Very focused light sensor that could only see a small portion of the screen. Pull the trigger and the screen is momentarily replaced with all black and a white box where the duck is. If sensor sees light, you hit the duck.

Anonymous 0 Comments

Watch this explanation by The 8-Bit Guy. It helped explain it to my monkey brain with good visual examples. https://youtu.be/Nu-Hoj4EIjU

Anonymous 0 Comments

If you’ve ever noticed the screen flash whenever you shoot, that’s what it relies on. The process when you pull the trigger is basically

1. Make everything black except one target for like a 20th of a second (I forgot exactly how long, but it’s short enough to not take you out of the game)
2. Check the light sensor in the gun to see if it’s pointed at the white (which is why doing The Lightbulb Thing works, though this also has issues on modern displays)
3. If the gun “sees” the current white, tell the game that the “current” target has been shot and move on to the next target (which you’re probably not aiming at since you were aiming at the last one)

It’s less knowing where the gun’s pointed and more asking “Ok but did they hit *this* one?” for every on-screen target every time you pull the trigger.

Anonymous 0 Comments

The game doesn’t read the gun, the gun reads the screen. If it sees white, it’s a hit. Anything else, it’s a miss. If you pointed the gun at the edge of the screen or at a bright light, it would always see white, always “hit” the duck, and that’s how you cheated at Duck Hunt.

The Zapper doesn’t work with flatscreen TVs because the screen can’t flash as brightly as a CRT, so there isn’t enough light for the Zapper to “see” the white box.

Anonymous 0 Comments

The gun was just a simple light sensor.

When you pull the trigger, the screen goes black for 1 frame. The gun then reads the amount of light it’s seeing and sets a baseline reading.

The next frame a white square is drawn where the duck is. If the reading on the light sensor increases during this frame, it knows you’re pointed at a duck. This is why it was easy to trick by just pointing the gun at a light.

If there is more than one duck, then it would draw one square over the first duck on the first frame, then on the next frame remove that square and draw one over the next duck, etc. Since it knows what frame each duck is on, it can tell which one your pointed at by which frame the sensor gets brighter.

All this happens in a fraction of a second, and since it’s a shooting game the average player just thinks of it as a muzzle flash effect and is none the wiser.