Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Joystick support for Xith  (Read 2855 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Posted 2006-08-29 16: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
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2006-08-29 17: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 Smiley

Endolf

Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #2 - Posted 2006-08-29 18: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 Smiley) 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!
Legends of Yore - The Casual Retro Roguelike
Offline croft

Junior Duke




Java, Java, Java


« Reply #3 - Posted 2006-08-29 21:00:07 »

I have used JInput successfully:
http://www.croftsoft.com/library/software/infant/

David Wallace Croft / www.CroftSoft.com / (214) 636-3790 m / Advanced Java Game Programming
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #4 - Posted 2006-08-29 21: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 Smiley
Quote
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) Smiley

Endolf

Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #5 - Posted 2006-08-30 16:13:16 »

Thanks, Croft. Thanks Endolf. I'll definitely give it a try.

Marvin
Offline khangharoth

Junior Duke




There is more to life than JAVA...But Java Rocks


« Reply #6 - Posted 2006-08-30 17: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 ...... Smiley

Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #7 - Posted 2006-08-30 18: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 Wink
3. Some mates of mine are buisy playing WOW.  Angry
4. I have no girlfriend  Wink Sad Shocked Huh Undecided Cry

                                        Reallly wanted to thank you for the kind of support you have given to Xith in recent times ...... Smiley

You're welcome.
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #8 - Posted 2006-08-30 18:22:47 »

4. I have no girlfriend  Wink Sad Shocked Huh Undecided Cry
Qudus my friend, the day you don't answer a question in <5 min., we all know you got one  Wink Wink

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #9 - Posted 2006-08-30 18:56:34 »

Qudus my friend, the day you don't answer a question in <5 min., we all know you got one  Wink Wink
Smiley

hmm... I needed 33 min. Where is she  Huh Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline hawkwind

Junior Duke




Java games rock!


« Reply #10 - Posted 2006-08-30 21: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
Offline hawkwind

Junior Duke




Java games rock!


« Reply #11 - Posted 2006-08-30 21:13:57 »

same for me....I am just on the verge of being able to actively help again

Quote
Reallly wanted to thank you for the kind of support you have given to Xith in recent times ...... Smiley
Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #12 - Posted 2006-08-30 21: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...  Wink
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #13 - Posted 2006-08-31 13: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...  Wink
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"
Offline Amos Wenger

Senior Duke




Everything's possible, but not everything's fun...


« Reply #14 - Posted 2006-08-31 13:12:33 »

Qudus my friend, the day you don't answer a question in <5 min., we all know you got one  Wink Wink
Smiley

hmm... I needed 33 min. Where is she  Huh Wink
Ahmmmm.. she wasn't patient enough..  Grin Grin

"Once you start working on something, don't be afraid of failure and don't abandon it. People who work sincerely are the happiest"
Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #15 - Posted 2006-08-31 19: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 Huh

Marvin

PS: I'm using Kubuntu Dapper Drake 6.0.6 with kernel 2.6.15-26-386
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #16 - Posted 2006-08-31 21:40:51 »

Hi

Do you even have read access on those files?

Endolf

Offline Marvin Fröhlich

Senior Duke




May the 4th, be with you...


« Reply #17 - Posted 2006-09-01 08: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.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #18 - Posted 2006-09-01 11: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

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Longarmx (38 views)
2014-10-17 03:59:02

Norakomi (28 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (53 views)
2014-10-14 00:39:48

TehJavaDev (54 views)
2014-10-14 00:35:47

TehJavaDev (42 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!