As a teenager, I used to have a video game console with a ‘gun’. On the screen you could see some ducks – flying around – and you had to shoot them down. I used to wonder how, with a normal TV – the gun was able to detect whether a duck has been shot or not.
Now I know – the computer controlling the device blanks the screen for a fraction of a second, and shows only the duck in white. On the gun there is a ‘photodiode’ – a small LED like thing that can detect light. If it senses darkness followed by white light, it means a duck has been hit.