Light Gun Programming

This is a discussion on Light Gun Programming within the C++ Programming forums, part of the General Programming Boards category; Hey there. I'm facing up a little bit of a challenge here. Has anybody ever programmed to make a light ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    Lightbulb Light Gun Programming

    Hey there.

    I'm facing up a little bit of a challenge here.
    Has anybody ever programmed to make a light gun work.

    I don't have any idea where to start and I can't find some C/C++ code for the USB port or code for Light guns.

    Any help would be tremendously appreciated.
    Thank you

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    email the light gun manufacturers and ask if they have any developer resources etc.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    194
    This is my understanding of how light guns work.
    When you press the trigger, a signal is sent to the program.
    Then the program draws the screen all black, and draws the targets in white.
    Then once the screen is drawn like this, it uses the reading from the photosensor in the gun to tell if it is a hit or miss. Then quickly redraws the screen back the original colors.
    I think that came from www.howstuffworks.com

    Now that i know this im tempted to break out my old nintendo, and zapper and shine a bright light at the gun and see if i hit the target or not

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Critique my lighting model.
    By psychopath in forum Game Programming
    Replies: 4
    Last Post: 08-12-2006, 07:23 PM
  2. geometry won't display!?
    By psychopath in forum Game Programming
    Replies: 17
    Last Post: 09-21-2004, 11:10 AM
  3. How many forums members to change a lightbulb.
    By adrianxw in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 01-01-2004, 08:31 PM
  4. A Common Scientific Belief
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 03-29-2002, 05:54 PM
  5. Light Gun Programming
    By NapalmB in forum Game Programming
    Replies: 4
    Last Post: 01-17-2002, 09:51 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21