Once I made a program that was like duck hunt, except you held a webcam at the screen. When you fired, the screen flashed black with a patch of white where the duck was, the camera took a snapshot and looked for how close to the center of the webcam's frame the white was to decide if you had hit it or not. It worked surprisingly well.