APIs for gamepads

Hi,

Is there any Java API for the 360 controller on the PC?

I saw a project called JInput around, but is it abandoned? Does it work with the 360 gamepad?

Any recommendation?

Yup, JInput is the best for the job and it’s not abandoned. It’s still maintained by our very own Endolf.

Awesome! I am going to try it out then.

Are there any pointers to documentation that I should see?

http://www.java-gaming.org/index.php/topic,4971.0

Who me?, nope, not me, nothing to do with me …, I blame :point: them! …

There’s also a bit of a wrapper around it in LWJGL which makes it fractionally easier.
I’m using it here and it’s pretty nifty. About the only thing missing that would be good is the ability to hot plug / unplug controllers.

Cas :slight_smile:

Feel free to submit the patch :), had a few requests for this, but no-one deemed it important enough to implement :slight_smile:

Endolf

Sadly now I earn a living from making games instead of merely tinkering I spend all my programming time, well, making games, instead of tinkering with the APIs underneath :confused:

Cas :slight_smile:

I’ll take that as another ‘not important enough to justify the expense’ :slight_smile:

Endolf

Pretty much yes.

Cas :slight_smile:

Disappointing… :stuck_out_tongue:

I looked at it. Thar be dragons in JInput!

There is code her for Xbox 360 controllers:
https://code.google.com/p/pg3b/source/browse/#svn%2Ftrunk%2FJava%2Fsrc%2Fcom%2Fesotericsoftware%2Fcontroller%2Finput
Uses Microsoft’s crap via JNI on Windows, because it is the only thing that has sane trigger axis. Otherwise it falls back to JInput.

JInput works fine with JogAmp too, we have to implement some nice features to ease its integration in existing applications using NEWT (our native windowing system).

I find that ability missing in many games (Even high profile ones), so I’m guessing it isn’t that trivial.

I’m actually tinkering with JInput and with JNI in general, I might take a look… But I make no promises. ::slight_smile:

I suspect it is trivial, just not many people bother with it. But solve it once in JInput and it’s solved for a lot of people all at the same time…

Cas :slight_smile:

This is true. JInput is used by a crap-ton of people.