JInput on a very small game ??

Hello!

Im wondering if there is a 4K or some other very small game,
with JInput for Gamepad.

This is too slow for me to study from docs, as im not a good in computer english.
Do you know any very small Java game with Gamepad support ( JInput ).
I then could take a quick peek to source code ??

//----

Thanks,

JInput has not had size as one of it’s design constraints. the main jar with all the java code in is >200k, and the natives are between 15k and 150k.

HTH

Endolf

Hello!

I think that, I could use a very simple source code to, how to use JINPUT with gamepads.
I have 3 gamepads and it would be very nice to have the use of them all with my future Java projects.

So, Im wondering if you or some other person could share a quick source where i could study my JINPUT very fast.

//----

Thanks,

There are 3 places that spring to mind for examples.

This is a couple of examples in the jinput source repository, there are also some tests. Then there is the Getting started thread. That should be all you need. If there is anything missing, let me know, because it means I need to update the documentation :).

Endolf

Hei!

Ok, I get the examples working with my Netbeans 6.5.1.
Now i just need to study how to read gamepads.


( edit. )

I have MOUSE and TWIN USB JOYSTICK.

I found the readallevents demo source, i managed to run it correctly.
after a while when it is running it starts to give me following error message,

Failed to poll device: Failed to get device key states (9)

This message comes from my second Gamepad the first Gamepad and Mouse
are operating OK, what may be the reason for second Gamepad to stop operating ??

Is there any way to reset JINPUT after fail ??

( edit. )
the second Gamepad stops operating when i at the same time read my mouse and the first Gamepad.
i dont get this error when i stop reading MOUSE, both my Gamepads operate just fine when i dont read Mouse, why ??

( edit. )
hmmh, i have 10 USB connections on my computer, i changed both the Mouse and Twin USB Joystick USB ports to another,
and now it seems that i havent received the error message anymore for a while, half of the weekend i spend with the problem,
now it seems to solve itself when i just changed usb ports, :slight_smile: .

( edit. )
Error is back, i start a new thread for it.

//----

Thanks,