Jump to content
  • Advertisement
Sign in to follow this  
Sijmen

[java] [Java] Using a custom-made controller

This topic is 4698 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello dear folks, I'm trying to find out how to build a custom controller, connect it to a computer, and use Java to read input from the controller. As I've understood there are basically three options: 1. Use the gameport and let the controller be a gamepad with a certain number of axes and buttons. However, I'm a bit concerned with the Java connectivity, and the fact that gameports are often not found on small PC's. 2. Use the serial port and write a custom interface. There is a 'Java Communications API' that should allow to do this, but it appears to work only under Linux. I'd like to have something cross-platform in this case. 3. Use the USB port. However, I can't find many articles on this topic. There are two libraries I found: 'jUSB' (OSS for Linux) and another - of which the site seems to be down - for Windows. But here too, I would like to have something cross platform. So, would there be any cross-platform way to connect a custom-built controller to a computer and use it with Java? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Fo' sho' click me for JInput.
Quote:

The API itself is pure Java and presents a platform-neutral completely portable model of controller discovery and polling. It can handle arbitrary controllers and returns both human and machine understandable descriptions of the inputs available.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!