Marvin Fröhlich
|
 |
«
Posted
2006-08-29 18:54:50 » |
|
I found this project on sourceforce, which adds joystick support to java. Maybe we should consider adding a jar (of this project or a comparable one) to the tk release like we did for HIAL. And maybe we should add special support for it after we inspected it. What do you think? Marvin
|
|
|
|
|
endolf
|
 |
«
Reply #1 - Posted
2006-08-29 19:27:21 » |
|
First, I'm involved in JInput so I am a little bias. Having said that, javajoystick doesn't look like it's been touched in about 3 years, has no support for linux kernels 2.6+ and has no OSX support. All of which jinput has, and is in current development (thanks largly to elias). I'm not oposed to javajoystick, it's just that there maybe alternatives that you might consider. The choice is yours  Endolf
|
|
|
|
Marvin Fröhlich
|
 |
«
Reply #2 - Posted
2006-08-29 20:29:16 » |
|
Oh, sorry, I forgot JInput. The lib mentioned above was the first one i found by google. I didn't have a closer look at it so I didn't discover the long time not updated. I used JInput about one or two years ago. And I had some problems with it. It caused a lot of debugging output that the developers weren't willing to turn off of make optional. This was just ugly but not a no-go (but I would really, really prefer to turn it off). Has this changed? The second problem, which definitely was a no-go, was that I had to manually set the access bits of the mouse-, keyboard- and joystick devices to read- write. I cannot force the people who are bying my games (in some wonderful future  ) to login as root and change the access bits of device nodes, which isn't possible for noobs or some kind of "just-gamers" and is unaesthetic for anyone. At least it shouldn't be necessary. The devices are working fine for other input libraries without these extended access bits. Has this one changed? If these problems have been solved, I would love to give it a second chance, because it basically looked very good and was quite easy to use. Marvin
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
|
|
endolf
|
 |
«
Reply #4 - Posted
2006-08-29 23:30:14 » |
|
It caused a lot of debugging output that the developers weren't willing to turn off of make optional. This was just ugly but not a no-go (but I would really, really prefer to turn it off). Has this changed?
Yes  The second problem, which definitely was a no-go, was that I had to manually set the access bits of the mouse-, keyboard- and joystick devices to read-write
That was fixed some time in v1, v2 is already out in the wild, give it a try, it's nicer(tm)  Endolf
|
|
|
|
Marvin Fröhlich
|
 |
«
Reply #5 - Posted
2006-08-30 18:13:16 » |
|
Thanks, Croft. Thanks Endolf. I'll definitely give it a try.
Marvin
|
|
|
|
|
khangharoth
Junior Member  
There is more to life than JAVA...But Java Rocks
|
 |
«
Reply #6 - Posted
2006-08-30 19:37:01 » |
|
An off hand comment for Qudus " From where you get so much time to do all these " .. Reallly wanted to thank you for the kind of support you have given to Xith in recent times ...... 
|
|
|
|
Marvin Fröhlich
|
 |
«
Reply #7 - Posted
2006-08-30 20:10:17 » |
|
An off hand comment for Qudus " From where you get so much time to do all these " ..
1. I'm studying computer science and only working half-time. And I usually take very much time from which I should spend on studying to work on private projects like xith or a game I started a couple of months ago and which I delayed for the moment in favor to xith development. 2. I like to work till the break of dawn to get things to work that I'm interested in. And Xith definitely is such a thing  3. Some mates of mine are buisy playing WOW.  4. I have no girlfriend  Reallly wanted to thank you for the kind of support you have given to Xith in recent times ......  You're welcome.
|
|
|
|
|
Amos Wenger
|
 |
«
Reply #8 - Posted
2006-08-30 20:22:47 » |
|
Qudus my friend, the day you don't answer a question in <5 min., we all know you got one 
|
"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
|
|
|
|
|
Games published by our own members! Check 'em out!
|
|
hawkwind
Junior Member  
Java games rock!
|
 |
«
Reply #10 - Posted
2006-08-30 23:12:41 » |
|
Wait wait wait...are you suggesting that post code and relatively cool exa,ples is not a babe magnet....accckkk wasting time....accckkkk
|
|
|
|
|
hawkwind
Junior Member  
Java games rock!
|
 |
«
Reply #11 - Posted
2006-08-30 23:13:57 » |
|
same for me....I am just on the verge of being able to actively help again Reallly wanted to thank you for the kind of support you have given to Xith in recent times ...... Smiley
|
|
|
|
|
Marvin Fröhlich
|
 |
«
Reply #12 - Posted
2006-08-30 23:25:27 » |
|
Wait wait wait...are you suggesting that post code and relatively cool exa,ples is not a babe magnet....accckkk wasting time....accckkkk
Well... what a wonderful world would that be... We are doing what we can do best, and the women loved us for that... 
|
|
|
|
|
Amos Wenger
|
 |
«
Reply #13 - Posted
2006-08-31 15:05:54 » |
|
Wait wait wait...are you suggesting that post code and relatively cool exa,ples is not a babe magnet....accckkk wasting time....accckkkk
Well... what a wonderful world would that be... We are doing what we can do best, and the women loved us for that...  Hey stop that Qudus, you make me dreaming... If only what you said was true..
|
"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
|
|
|
Amos Wenger
|
 |
«
Reply #14 - Posted
2006-08-31 15:12:33 » |
|
Ahmmmm.. she wasn't patient enough.. 
|
"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
|
|
|
Marvin Fröhlich
|
 |
«
Reply #15 - Posted
2006-08-31 21:56:49 » |
|
I tried JInput (2006-08-14er release). 1 2 3 4 5 6
| ControllerEnvironment env = ControllerEnvironment.getDefaultEnvironment(); for (Controller c: env.getControllers()) { System.out.println(c.getName()); } |
I got this result: 1 2 3 4 5 6 7 8 9 10 11 12 13
| Failed to open device R/W: Failed to open device /dev/input/event1 (13)
Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)
Failed to open device R/W: Failed to open device /dev/input/event2 (13)
Failed to open device (/dev/input/event2): Failed to open device /dev/input/event2 (13)
Failed to open device R/W: Failed to open device /dev/input/event0 (13)
Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)
Linux plugin claims to have found 0 controllers |
Am I doing something wrong? I thought it doesn't need to open the deveices R/W anymore  Marvin PS: I'm using Kubuntu Dapper Drake 6.0.6 with kernel 2.6.15-26-386
|
|
|
|
|
endolf
|
 |
«
Reply #16 - Posted
2006-08-31 23:40:51 » |
|
Hi
Do you even have read access on those files?
Endolf
|
|
|
|
Marvin Fröhlich
|
 |
«
Reply #17 - Posted
2006-09-01 10:31:31 » |
|
Do you even have read access on those files?
Hey, good question. No, I haven't. Strange. Those files are owned by root:root and have rw bits set for user and group. I could set rw bits for others now or change the group to something that my user is a member of. But all this shouldn't be necessary. If I was playing a game utilizing jinput on a system that I don't have the root password of, it even was not possible. Where does AWT for example get it's input information from? There must be an input deamon that one should be able to talk to without extended rights.
|
|
|
|
|
endolf
|
 |
«
Reply #18 - Posted
2006-09-01 13:17:00 » |
|
AWT get's it from the window manager, and there is an AWT plugin for JInput that exposes mouse and keyboard that does not require direct access to the devices and thus doesn't need read permissions.
The issue is this. JInput does not rely on the window manager, this it has no concept of one. Under windows, you can open up a window, 0x0 pixels in size, with no task bar entry, and no window around it, and still have access to the devices where ever they are. Under linux, we are not even sure we have a window manager (it will work on a console only terminal), so we have to read/write directly from the event devices, or joystick devices, which are device files like every other character device on linux. On some distro's you have to modify the access permissions to your graphics card device nodes if you want to use your nvidia card under X in any sort of accelerated maner. So we have no choice but to use the device nodes, and thus we need read access. Write access is optional, but is needed if you want force feedback to work.
There was(is) an SDL plugin around somewhere for JInput 1.0 that might not have had this issue, but required all the SDL libraries to be installed. You would then need to have an SDL window open and forgrounded for the device status changes to be reported though.
HTH
Endolf
|
|
|
|
|