Sign in to follow this  
Sijmen

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this