Light Gun Programming

This is a discussion on Light Gun Programming within the Game 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
    Registered User
    Join Date
    Oct 2001
    Posts
    375
    What OS? ...'n what is a Light gun? I suppose you mean you need to write your own device drivers, in which case maybe this link will help.
    Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,586
    The light gun on a PC (if there is one) would be controlled exactly as the light pen is. The light pen is all but extinct now but there are documents out there on how to program for one. Check on a search engine - I found some info one time but don't remember where it was.

  4. #4
    Unregistered
    Guest
    He means like the Nintendo Zapper (That red and grey gun).

  5. #5
    Registered User heat511's Avatar
    Join Date
    Dec 2001
    Posts
    169
    actually i just recently learned how the zapper works, at least in duck hunt for the regular nintendo. If you have ever played it, the screen flashes whenever you hit the button. When this occurs, the screen turns white and the ducks black. Then all the gun has to do, is determine if it is pointed at a black or white spot.

    hope that helps,

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, 06:23 PM
  2. geometry won't display!?
    By psychopath in forum Game Programming
    Replies: 17
    Last Post: 09-21-2004, 10: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, 07:31 PM
  4. A Common Scientific Belief
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 03-29-2002, 04:54 PM
  5. Light Gun Programming
    By NapalmB in forum C++ Programming
    Replies: 2
    Last Post: 01-05-2002, 04:53 PM

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