Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Joysticks

  1. #1
    Member
    Join Date
    Feb 2012
    Location
    Azle/Arlington
    Posts
    31
    My Mood
    Torn
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Joysticks

    Is it possible to implement the use of joysticks (I.E. a USB PS3 controller) and have the buttons and joysticks work in a hypothetical game. (I have yet to be able to find a api or documentation that will help me.) Basically use in my library and then call from my personal library.

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Joysticks

    You might be better off doing this outside Java- use an external program to map your PS3 controller to your computer's keyboard, then just use standard keyboard mappings within your Java program. Do a google search for things like "map ps3 controller to keyboard" for some options.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Member
    Join Date
    Feb 2012
    Location
    Azle/Arlington
    Posts
    31
    My Mood
    Torn
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Joysticks

    well only problem with that is im a universal programmer and prefer my programs to be also. I use java, and mild c++ and would like my program to be able to just plug and play on any computer.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Joysticks

    I can agree with that. The problem is, for stuff like this, you're probably going to have to use native code, which blows away your platform independence right there. And what if one of your users does not have a ps3 controller? That's why I would think it best to leave the mapping up to the user, outside of Java.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Member
    Join Date
    Feb 2012
    Location
    Azle/Arlington
    Posts
    31
    My Mood
    Torn
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Joysticks

    well that i get and im working with a c++ guy and how u do it there it can be generic buttons instead of platform specific. (I.E. button 1 being triangle, but another button on a 360 controller can be 1.) I will just have to use virtual controllers linked with keys on the keyboard. (WASD and Arrow pads) thanks all.