diff JavaJoystick jinput

So what are the differences of JavaJoystick and jinput.
It appears sourceforge’s site is not responding (as of 5:21pm today) so I wasn’t able to find anything on JavaJoystick.

What is jinput and who is developing it? Is there a web page?

Thanks

Hi
java joystick is joystick only, jinput is joystick, mouse and keyboard, with gamers in mind. Sun have done the standard and I beleive they did the windows version, both the mac OSx and linux versions are being developed by others as part of the community project.

HTH

Endolf

JInput would presumably expand to cover flight yokes, steering wheels & foot pedals and all the other “fancy” controllers too.
I don’t know anything about JavaJoystick… does it support force feedback etc? JInput is designed to.

(edited for typos, and no swp, I wasn’t on my mac :P)

Its been crazy for me, I apologize. We are getting our house ready for sale and trying to get packed up and moved out by the middle of next week.

As the project manager for Jinput let me define it for you real fast:

Its is a cross-platform API for the discovery and polling of input devices including (but not limited to) keyboard, mouse, joysticks, wheels, game-pads, etc. It provides a unified method of discovering, understanding, and polling all these devices.

The closest analagous system is MSFT’s Win32 specific DirectInput but JInput is not platform specific.

JInput has two parts to it. The “top part” where the API is defined is pure Java. The “bottom part” consists of one or more platform specific plug-ins. To port JInput to a new platform, you write a new plug-in.

JInput was designed by a Sun and a Sony Computer Entertainment employee working together as a sub-committee in JSR134. Since that time we have completed a reference implementation that includes a Win32 plugin and released it all as an open source project at http://jinput.dev.java.net

Hope that helps. Don’t ask me about the other source-forge project as I know nada about it.

Jeff, you must not have been at your Mac… or you turned off the spell checking :slight_smile:

Is the either of the Sun or Sony employees participating on these forums?

Unless you have heard something I haven’t about my employment status then there are definitely Sun employees participating (me, Chris when hes back, Doug, Dan, Athomas, Ken, etc…)

If there’s anyone from Sony then they haven’t announced themselves.

JavaJoystick is very simple and is modelled after the AWT event model for the most part (although it doesn’t use any actual “event” objects).

You implement the JoysticKListener interface:

public void joystickButtonChanged( Joystick j );
public void joystickAxisChanged( Joystick j );

And then the Joystick object is just a simple little object to find out what was changed.

You can also poll the joystick but it’s still the exact same underneath, just slightly different at the interface level.

I am currently using JavaJoystick in my game and I have no complaints. It’s simple, but it does what I need and has no bugs as far as I can tell.

I meant of the two people on the team that developed the code as part of JSR134.

I figured you would have said if it was you and some dude from Sony, so that would mean it is a Sun person other than you that developed the JInput stuff that is sitting in CVS. Which one of you was it, or is that person on to other things now?

Nobody still considers JXInput? :’( :’(

Well, Sourceforge is back up and I checked out JavaJoystick. I tried their test program with my Gravis Gamepad (USB) under Linux and it worked great.

I’ve looked at the code (both Java and C++) and its pretty easy to understand.

Maybe JavaJoystick and JInput can hookup or something???

If I understand correctly jinput’s pretty much got the joystick end of things down pat. JavaJoystick is still limited to Linux and Windows as well, a sizable shortcoming IMO (I will probably ditch JJ as soon as I start looking into supporting OSX). It’s probably more a case of JavaJoystick is just becoming obsolete.

I’m still surprised by this complete acceptance of SUN trampling all over an open-source homested thats been settled so long…

We’ve had a “sorta” explanation in the JOGL area, what about in the JInput area? JavaJoystick and JXInput do some pretty similar things to JInput.

Kev

As for JXInput - thats windows only right?

I think, since JavaJoystick already has something for Linux and JInput doesn’t have anything for linux - then JavaJoystick might be able to be incorperated into JInput.

There is a differnce between something becoming obsolete and something merged/combined/extended. I was thinking that JJ could be used in the JInput’s Linux development.

But if JInput feels that can do the Linux part without JJ, then more power to them.

My bad, a post somewhere else in this forum had me thinking they had Linux joysticks covered. Maybe not.

I have nothing against JJ, and like I said I’m currently using it. But it seems kinda silly to adopt two joystick libraries, one for linux/win and the other for OSX, if I can find one that does all three.

Hi
under linux the joystick is the least of my worries. It has an easy to use, well defined interface. Mouse and keyboard on the other hand (which are part of jinput, but non of the others) are prooving to be a right pain in the butt :slight_smile:

Cheers

Endolf

[quote]As for JXInput - thats windows only right?
[/quote]
Nope. Only the pure joystick driver is currently available for Windows only. JXInput as an input solution with virtual/mixed axes/buttons/directionals or the eventing system is cross-platform.
There are not too many joysticks connected to Linux/Mac-boxes out there on the consumers desk?

Yes, jinput is quite similar to JXInput and I am a little bit annoyed that Sun did it again without consulting anybody else…

Even if they arn’t cross platforms, generally in the open source community it would have been more apprioriate to build on the existing code. So, SUN could happily have come along and helped to add full support to JXInput and/or JavaJoystick… and even expanded them to handle keyboard/mouse input.

On another note, I can understand why SUN felt JOGL was too big to just add to the Java standard. However, in the case of JInput keyboard/mouse input, wouldn’t it have been easier to just open up the AWT event system a bit?

Kev

So what is bad about the current AWT event handling of mice and keyboard?

Also - w/ JInput, I’ve looked through the code and man, there needs to be some documentation on how the thing works especially if JInput wants 3d parties to add modulas. Some design docs on the module interface is much needed. JavaDoc doesn’t cut it when extending/implementing existing software.

[quote]So what is bad about the current AWT event handling of mice and keyboard?
[/quote]
AWT keyboard input is downright broken in Linux. It’s not Sun’s fault, it’s the way X does it, and I wouldn’t be surprised if it’s equally broken in other Unices. It suffices for typical applications, but not for games.

It’d also be nice to do input in the same thread as logic.

But as it stands AWT input in Windows is decent enough.

Umm, I use linux and have been using linux for several years. I haven’t noticed anything wrong or funky w/ the keyboard nor mouse event handeling

Can you give specifics, where its “broken”?