Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: How to implement Joystick Support

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    america
    Posts
    9

    How to implement Joystick Support

    I was working on a flight simulator. Does anybody know hoe to implement joystick support? Is there anyway to do it through Direct Input or Windows Programming?

  2. #2
    Member Regular Contributor
    Join Date
    Sep 2000
    Location
    Vancouver BC Canada
    Posts
    433

    Re: How to implement Joystick Support

    You asked 2 questions... here are the answers:

    1: Yes, I know.
    2: Yes, there is.

    Cheers.

  3. #3
    Junior Member Newbie
    Join Date
    Jun 2000
    Posts
    3

    Re: How to implement Joystick Support

    Gee, how helpful, rts.

    Acer, look in the documentation for a function called joyGetPos. It's probably the easiest way to quickly get joystick input from Windows.

  4. #4

    Re: How to implement Joystick Support

    If you're doing it for a game or a demo you should probably use DirectInput. It's faster than GDI and takes advantage of any hardward accelleration present.

  5. #5
    Junior Member Newbie
    Join Date
    Jun 2001
    Location
    america
    Posts
    9

    Re: How to implement Joystick Support

    Thanx for the posts. I know directX pretty well or at least Direct Audio and Direct3d. I just have to learn Direct Input. I don't think I will be using windows for it. Anyway I have an awesome flight simulator I am working on. Your moving through the sky and you have a burst of flame coming out the back of the plane. As soon as I add a menu and joystick support, I'll add it to my webpage and you guys( and girls) can check it out.

  6. #6
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Augsburg, Germany
    Posts
    415

    Re: How to implement Joystick Support

    Wasn't there a tutoriol on DirectInput at NeHe's site?

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: How to implement Joystick Support

    I think rts's answer length was partly due to the fact that Joystick support has NOTHING to do with OpenGL.... There are game development discussion forums around there for that type of question !

    Eric

  8. #8
    Advanced Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    839

    Re: How to implement Joystick Support

    I think rts' answer was very apt and to the point. =)

  9. #9
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Huntsville, AL. USA
    Posts
    319

    Re: How to implement Joystick Support

    Everything you need can be found at (http://codeguru.earthweb.com/directx/index.shtml). In particular, look at the third box of links labeled "DirectInput". Jason Brooks has created three classes for DirectInput control ... One for keyboard input, one for mouse input, and one for Joystick input.

    Jason did a great job with these classes and I rely on them every day. Send him email if you like it.
    Obsessive - A word used by the lazy to describe the motivated.

  10. #10
    Junior Member Newbie
    Join Date
    Jun 2001
    Posts
    5

    Re: How to implement Joystick Support

    Actually, if you are looking toward making your program platform independent, you might want to consider SDL (http://www.libsdl.org). It's simple to use, and there are even examples to get you started.

    hpsolo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •