Today's shooting gallery games take advantage of high-tech infrared sensors and cameras. Back in the days of the original Nintendo Entertainment System, things were much simpler.
As a child I spent countless hours firing away at video game ducks with my NES Zapper light gun, but I wasn't actually firing anything. If anything, I was just recording light levels. The fine folks at Today I Found Out put old school light gun technology into perspective for me.
The Zapper really only consisted of two working parts: The trigger, and a photodiode. When the trigger is pulled, the photodiode kicks into gear, recording light levels from your television screen (usually, at least.) Once the NES realized you were firing, the entire screen would go black for a single frame. On the next frame, the area your target duck was in flashed white. If the photodiode registered the change from black to white, that meant you were pointing the gun in the right direction. For multiple targets, multiple target frames flash in sequence, telling the game which target was hit.
It's really an elegant little system, although early versions of the Zapper could be fooled into high scores by simply pointing them towards a bright light source, something I never did when anyone was looking.
Check out the link below for more fun Zapper facts.
How the Gun on the Original Duck Hunt Game Worked [Today I Found Out]