Input in Xith

Which input method should I use ?

First I tried pure AWT, with a class that extended AWTEventListener. That was not bad, but the problem is I had to maintain variables like button1Pressed or keyUpPressed.
Then I made a little library : OEM (Open Event Manager) that had a Vector of AWTEventS. It’s pretty convenient, cause you can treat the input when you do want. You just have a swap() method to call each time you run through the event list. It’s a kind of “double-buffering”.

But I see I won’t be able to handle LWJGL renderer with this approach. HIAL permits to do that, so I looked at this alternative… maybe I can do an HIAL-based OEM version…

And I see there’s JInput, too, that can handle controllers (joysticks, joypads…).

So really I don’t know what is the best…

Sure I don’t need controller support but it’s always “a nice thing to have” and, who knows, maybe I’ll implement it one day for one of my games…

What’s your opinion ?

Hi

Elias and co have just done some brilliant work on jinput to add an event queue style interface as well as the old way. I’ve only found 2 bugs so for, and considering that is in the linux force feedback code thats not surprising, I did the original code and I know how much of a pain it is :).

Endolf

I find HIAL works nicely with Xith3D. Being an abstraction layer, you can add support for other API’s. It would be nice to have an abstract controller interface.

Will.

Where can I found this work ? Seems interesting.

You mean, add support for JInput in HIAL ? (BTW, is HIAL a java.net project yet ?)

[quote="<MagicSpark.org [ BlueSky ]>,post:4,topic:26682"]

Where can I found this work ? Seems interesting.
[/quote]
See Elias first 2 posts in this thread.

HTH

Endolf

hial works just grand for me :slight_smile:

OK, I’ll see what I can do.
Probably I’ll make a JInput driver for HIAL, and then an event-queue system for HIAL. That’d be the more generic solution, IMHO.