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 (575)
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  
  JInput version?  (Read 3962 times)
0 Members and 1 Guest are viewing this topic.
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Posted 2009-11-30 05:32:18 »

Does JInput have the concept of versions? There seems to be only a "latest" download.

Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #1 - Posted 2009-12-01 05:34:01 »

I found JInput has a Version class with a getVersion method.

I found that unplugging a controller, then plugging it back in caused it to not be recognized any more. I looked at JInput's code to see what it would take to reload the controller list each call to getControllers rather than just the first time. Thar be dragons in the JInput code! Yeesh. I'll just live with it.

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #2 - Posted 2009-12-02 17:42:44 »

I found JInput has a Version class with a getVersion method.
I wouldn't rely on that to tell you more than major version changes, which has only happened once. I really ought to get around to having a nice version control system (and I don't mean cvs), but I've yet to find one better than the build timestamp or svn revision.

Quote
I found that unplugging a controller, then plugging it back in caused it to not be recognized any more. I looked at JInput's code to see what it would take to reload the controller list each call to getControllers rather than just the first time.
There is still an outstanding request for having controller listeners working. There is a listener interface for this. At the moment, if a controller is unplugged the existing controller object in JInput gets closed, any new controllers are ignored. I know of one project that did handle this, but they can't release the code publicly Sad. Maybe it's time I gave up hoping for other contributors and just did it myself.
Quote
Thar be dragons in the JInput code! Yeesh. I'll just live with it.
It has to handle native code on at least 3 platforms, what did you expect!!! Smiley

Endolf

P.S. Sorry for the delay in responce, spent a couple of days under a duvet with man flu.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2009-12-09 20:06:55 »

Thanks endolf. I was starting to feel very alone! Smiley Hope you are feeling better!

I've yet to find one better than the build timestamp or svn revision.

My problem is that the only JInput download is simple labeled "latest". Maybe the build system could write a file named "version" into the root of the zip? I like all JAR files in my project to be named name-version.jar so I can keep things straight in the future.

There is still an outstanding request for having controller listeners working. There is a listener interface for this. At the moment, if a controller is unplugged the existing controller object in JInput gets closed, any new controllers are ignored. I know of one project that did handle this, but they can't release the code publicly Sad. Maybe it's time I gave up hoping for other contributors and just did it myself.

Controller listeners work fine.

It would be ideal to support unplugging and replugging controllers, and also plugging in a new controller while the app is running. When JInput is first asked to get a list of controllers, it goes out and finds them all. When asked subsequent times, it just uses the existing list. Couldn't we just go out and find them all every time? Maybe have a new method for doing that?

It has to handle native code on at least 3 platforms, what did you expect!!! Smiley

Heh. Cheesy

Well, I expect there to be some nastiness hiding somewhere. JInput does hide this from the developer, but does so with a complex API that is hard to use. Slick puts a thin veneer over JInput to make it easier to use, AFAIK without losing functionality, so it is possible to have a more friendly API.

I don't like some of the logging. At startup it dumps some stuff. When poll fails it dumps some stuff. Not sure if it is the JDK logging or System.out.

Man, java.net sucks. It is so slow! Also every java.net project seems to look inactive for some reason.

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #4 - Posted 2009-12-09 22:02:25 »

Hope you are feeling better!
Mostly, enough to be back at work and coding Smiley

Quote
My problem is that the only JInput download is simple labeled "latest".
There are nightly builds that have the build date on them. Hudons builds this every night.

Quote
It would be ideal to support unplugging and replugging controllers
Agreed, thats what the controller listeners were originally intended for.

Quote
Couldn't we just go out and find them all every time? Maybe have a new method for doing that?
We could, it's slow, and there are some clearup issues to resolve ,like people still having references to controllers from the last poll, those old controller/component objects do not always need clearing, we might have the same list, so then the old objects should work still. Thats my plan. Maybe I ought to get on and do this Smiley

Quote
JInput does hide this from the developer, but does so with a complex API that is hard to use.
Yup, it's not the simplest, but it is very flexible. The idea of JInput was always as a building block, not much more than a wrapper over the native layer. We could have had a JInput utils project that tried some other things.

Quote
I don't like some of the logging. At startup it dumps some stuff. When poll fails it dumps some stuff. Not sure if it is the JDK logging or System.out.
I recently did a couple of logging updates. Hopefully the logging is all done in JDK logging, which means it can at least be turned off Smiley

Quote
Man, java.net sucks. It is so slow!
I'm with you on this one!!!

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #5 - Posted 2009-12-12 13:51:29 »

Ok, JInput builds under hudson now stick the build number in the version string, so any build from 200/12/12 or newer should have a build string like
1  
2.0.1-b374


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 (35 views)
2014-10-17 03:59:02

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

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

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

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

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

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

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

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

BurntPizza (75 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!