Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Location
    Richmond, CA
    Posts
    202
    Thanks
    3
    Thanked 10 Times in 9 Posts

    Game Controller Programming...

    Greetings everyone...

    I am working on a project (design phase right now) that will be a windows application where I have to interface with 2 game controllers that are connected by USB (1 controller per USB connection). The last time I did game controller programming, I was using a Commodore 64!

    I'm considering developing this in MFC/C++ or C#. Is there some standard library I should be looking at? Or some tutorial that describes how to do this? Can someone give me a kick in the right direction? Any help is appreciated. Thanks!

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    It probably depends on what game controllers you want to support. If you want to only use a Xbox 360 controller, I know for sure there is stuff available to do that. Otherwise for more generic game pad controllers, you might be able to do that using DirectX's DirectInput.
    OracleGuy

  • #3
    Regular Coder
    Join Date
    Aug 2006
    Location
    Richmond, CA
    Posts
    202
    Thanks
    3
    Thanked 10 Times in 9 Posts
    Well, as I said... we're in design stage right now.

    I'd probably like to make it as generic as possible, but the reality is that it's a single system (very specific situation) and knowing this client (I've done lots of work for them), they'll tell me to get the controller and bill them, so realistically, I can use anything I want...

    But thanks for the hint on directinput, I'll have to check it out and see if it makes sense for me.

    Thanks.

  • #4
    Gox
    Gox is offline
    Regular Coder Gox's Avatar
    Join Date
    May 2006
    Location
    Ontario, Canada
    Posts
    392
    Thanks
    2
    Thanked 20 Times in 20 Posts
    Microsoft's XNA Framwork provides handy classes for getting 360 controller input. The framework itself is geared more towards making games, but can be used with WinForms and is for use with C#. I'm not sure whether the controller classes/packages are strictly part of the XNA Framework, or whether it's a .net thing.


  •  

    Posting Permissions

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