Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  JInput webstart demo  (Read 7428 times)
0 Members and 1 Guest are viewing this topic.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Posted 2003-11-28 19:50:41 »

Hi
 Updated jinput to finally work with webstart, thanksgo to kevglass and jeff for input into this. To see it running go here, all the files can be viewed here. Don't steal the jars from this site, they probably won't work, and I don't plan on ever updating them, its just to show it working and the needed jnlp entries.

Cheers

Endolf

P.S. Greg, if you could post an updated mac osx jinput plugin i'll update the jnlp. I had to use the build on the file sharing section, which dates right back to august, so it's prolly well out of date Smiley

Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2003-11-29 01:53:26 »

Failed on OSX JDK1.4.2_001

Failure Message:
An error occurred while launching/running the application.

Title: JInput webstart demo
Vendor: New Dawn Software
Category: Download Error

Unable to load resource: http://www.newdawnsoftware.com/jinput/HIDWrapper.jar

Exception:
NLPException[category: Download Error : Exception: java.io.IOException : LaunchDesc: null ]
     at com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:605)
     at com.sun.javaws.cache.DownloadProtocol.getResource(DownloadProtocol.java:753)
     at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:621)
     at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:544)
     at com.sun.javaws.Launcher.downloadResources(Launcher.java:742)
     at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:298)
     at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:199)
     at com.sun.javaws.Launcher.run(Launcher.java:167)
     at java.lang.Thread.run(Thread.java:552)

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #2 - Posted 2003-11-29 05:08:57 »

Hi
 Ooops, forgot to set the file permissions on the mac libraries, should work now.

Cheers

Endolf

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

JGO Coder




Got any cats?


« Reply #3 - Posted 2003-11-29 17:34:28 »

Hurray!  It works!

So now someone needs to write a little article on doing JInput with Web Start.  Do you want to Endolf or should I look into doing it?

JK

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #4 - Posted 2003-11-29 21:16:40 »

Doh!! Figures it works for Jeff, it doesn't work for me.. I get a blank window that says Controller Read Test.

Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2003-11-30 03:29:13 »

That soudns like it failed to find any devices.

What devices do you have plugged into your Mac?

On my g4 Tibook it found my trackpad and mouse button.  (Although now that I think of it, it failed to find KB which is odd and should probably be  looked into.)

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #6 - Posted 2003-11-30 10:39:14 »

Quote
Hurray!  It works!
excellent
Quote
So now someone needs to write a little article on doing JInput with Web Start.  Do you want to Endolf or should I look into doing it?

JK


It's pretty simple, you follow kevs guid on webstart here and just add the properties that are in the jnlp file for each platfrom, and as long as you are using a cvs build or a nightly after the 28th it should just work Smiley

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #7 - Posted 2003-11-30 10:41:19 »

Quote
Doh!! Figures it works for Jeff, it doesn't work for me.. I get a blank window that says Controller Read Test.

Agree with jeff, sounds like it's found no devices at all, it's a very old build so its highly possible. Jeff said that the build server was doing something funny, if there are newer builds tonight when I get home that have the binaries in them then i'll upload some fresh ones and post back.

Endolf

Offline kevglass

« JGO Spiffy Duke »


Medals: 205
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2003-11-30 10:47:46 »

Quote

It's pretty simple, you follow kevs guid on webstart here and just add the properties that are in the jnlp file for each platfrom, and as long as you are using a cvs build or a nightly after the 28th it should just work  


I can add a "special considerations" section at the bottom if you want. Not sure if anything other than JInput has any worries tho Smiley

Kev

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #9 - Posted 2003-11-30 21:20:47 »

Hard to imagine it wouldn't find any devices out of the track pad & keyboard that are built-in, the external USB mouse, or the macally iShock II gamepad.

I will have a look to see if i have old jinput code in my ~/Library/Java/Extensions folder that could be causing problems...

I know that the last time I checked a month ago that most of the devices were found.

** EDIT **
That was it. When will I learn...  seems to be  working now.

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

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #10 - Posted 2003-11-30 21:27:06 »

Unfortunately because of apparent Apple bugs, the single button trackpad shows up with both a left and right button...sigh.  Even games that do the right thing and try to detect what buttons are available will get screwed.
Argh.

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #11 - Posted 2003-11-30 22:12:43 »

The OS X bug is still there where no qualifier keys are detected.. e.g. pressing shift, ctrl, option(alt), command,.. don't trigger any changes on the keyboard window.

This is of course a major pain because many games like to use those keys for fire, jump etc.

I thought that problem was going to be fixed with Panther.. apparently not.

I suggest some colour is added to the test program for binary switches (buttons, keys, direction pads) so that when a key is pressed not only does it change the text from OFF to ON but it also changes the background colour to green or something.  It would make it so much easier to see key presses in that sea of keys.

Offline Jeff

JGO Coder




Got any cats?


« Reply #12 - Posted 2003-12-01 04:22:01 »

I was thinking the same thing, bold and red for ON Smiley

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #13 - Posted 2003-12-01 06:07:53 »

Hi
 Thanks for trying it, I take it that means that it works as well (or as badly) from jws as it does from command line?, this was just a test of web starting jinput, rather than a test of jinput itself.

Cheers

Endolf

Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #14 - Posted 2003-12-02 02:21:00 »

Yes.. the Web Start aspect is working fine.

Offline Jeff

JGO Coder




Got any cats?


« Reply #15 - Posted 2004-02-24 20:58:56 »

Hmm Jinput webstart blowing up on my mac Sad

OSX 10.3.2

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline gregorypierce

Senior Devvie




I come upon thee like the blue screen of death....


« Reply #16 - Posted 2004-02-24 21:58:15 »

Quote

P.S. Greg, if you could post an updated mac osx jinput plugin i'll update the jnlp. I had to use the build on the file sharing section, which dates right back to august, so it's prolly well out of date Smiley


Nah, that sounds about right. I haven't touched it in months because I haven't had a reason to. Its not #1 on my priority list. JOGL needs the most attention because its in horrible shape, performs poorly, have pixel format issues, and does some nasty things with renderings that I haven't been able to track down. The JOGL rendering mechanism is rather obfuscated and makes it difficult to track down issues.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline gregorypierce

Senior Devvie




I come upon thee like the blue screen of death....


« Reply #17 - Posted 2004-02-24 21:59:02 »

Quote
Hmm Jinput webstart blowing up on my mac Sad

OSX 10.3.2


Can't confirm. It was running fine a few days ago when swpalmer sent me a link to a JInput demo. If its blowing up, a stack trace is necessary for me to do anything about it.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline Jeff

JGO Coder




Got any cats?


« Reply #18 - Posted 2004-02-24 22:24:38 »

Maybe im using the wrong link. Can you point me at the one you used?

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #19 - Posted 2004-02-25 13:04:25 »

http://www.newdawnsoftware.com/jinput/jinput.jnlp

Offline Jeff

JGO Coder




Got any cats?


« Reply #20 - Posted 2004-02-25 19:28:20 »

Okay that link fails for me(never opens any frames.)

I'm going to do the docs over the next few days as Im traveling.  (Going to see a major publisher I can't name, sorry.)

If i get a chance Ill also DL the latest tree to my OSX box and try to debug more

Here is the output in the console if it means anything to you:

Java Web Start 1.4.2_03 Console, started Wed Feb 25 14:22:58 PST 2004
Java 2 Runtime Environment: Version 1.4.2_03 by Apple Computer, Inc.
net.java.games.input.OSXEnvironmentPlugin instance created
Creating HID engine
Enumerating devices
Found keyboard [Keyboard] device address [3907552]
Adding key [224]
Adding key [225]
Adding key [226]
Adding key [227]
Adding key [228]
Adding key [229]
Adding key [230]
Adding key [231]
Adding key [-1]
Adding key [-1]
Adding key [-1]
Adding key [-1]
Adding key [-1]
Adding key [-1]
Adding key [-1]
Adding key

  • Adding key [1]
    Adding key [2]
    Adding key [3]
    Adding key [4]
    Adding key [5]
    Adding key [6]
    Adding key [7]
    Adding key [8]
    Adding key [9]
    Adding key [10]
    Adding key [11]
    Adding key [12]
    Adding key [13]
    Adding key [14]
    Adding key [15]
    Adding key [16]
    Adding key [17]
    Adding key [18]
    Adding key [19]
    Adding key [20]
    Adding key [21]
    Adding key [22]
    Adding key [23]
    Adding key [24]
    Adding key [25]
    Adding key [26]
    Adding key [27]
    Adding key [28]
    Adding key [29]
    Adding key [30]
    Adding key [31]
    Adding key [32]
    Adding key [33]
    Adding key [34]
    Adding key [35]
    Adding key [36]
    Adding key [37]
    Adding key [38]
    Adding key [39]
    Adding key [40]
    Adding key [41]
    Adding key [42]
    Adding key [43]
    Adding key [44]
    Adding key [45]
    Adding key [46]
    Adding key [47]
    Adding key [48]
    Adding key [49]
    Adding key [50]
    Adding key [51]
    Adding key [52]
    Adding key [53]
    Adding key [54]
    Adding key [55]
    Adding key [56]
    Adding key [57]
    Adding key [58]
    Adding key [59]
    Adding key [60]
    Adding key [61]
    Adding key [62]
    Adding key [63]
    Adding key [64]
    Adding key [65]
    Adding key [66]
    Adding key [67]
    Adding key [68]
    Adding key [69]
    Adding key [70]
    Adding key [71]
    Adding key [72]
    Adding key [73]
    Adding key [74]
    Adding key [75]
    Adding key [76]
    Adding key [77]
    Adding key [78]
    Adding key [79]
    Adding key [80]
    Adding key [81]
    Adding key [82]
    Adding key [83]
    Adding key [84]
    Adding key [85]
    Adding key [86]
    Adding key [87]
    Adding key [88]
    Adding key [89]
    Adding key [90]
    Adding key [91]
    Adding key [92]
    Adding key [93]
    Adding key [94]
    Adding key [95]
    Adding key [96]
    Adding key [97]
    Adding key [98]
    Adding key [99]
    Adding key [100]
    Adding key [101]
    Adding key [102]
    Adding key [103]
    Adding key [104]
    Adding key [105]
    Adding key [106]
    Adding key [107]
    Adding key [108]
    Adding key [109]
    Adding key [110]
    Adding key [111]
    Adding key [112]
    Adding key [113]
    Adding key [114]
    Adding key [115]
    Adding key [116]
    Adding key [117]

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #21 - Posted 2004-02-25 19:34:14 »

Good news, was a bad JWS cache. I celared it and nwo it runs.

I see the Mac KB problem.  It brings up an interesting issue.  Should we either:

(a) Require that well known key names be returned and make the plug-in translate where necessary  

OR

(b) Add a function or two to the plugin to convert kb button numbers to/from well known key names.

I'm tempted to say (b) and leave what is returned the raw return values from the OS but I'm not sodl on one or the other.  I do agreee that there needs to be a way to find out that a given button is the "w" key on any given platform.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #22 - Posted 2004-02-25 21:32:05 »

Given that we agree that getting the real key name is a requirement, I don't see why we don't go with (a).   I just makes things more consitent for the app programmers.  If the API *sometimes* returns valid key names people may not ever call the function in (b).  Specially people that don't have a Mac to test on.

Offline Jeff

JGO Coder




Got any cats?


« Reply #23 - Posted 2004-02-25 21:35:43 »

Alright,  then Ill suggest we use the Win32 key names as the "standard" as they seem reasonable.  

Everyone else agree?

Edit: as part of my doc job this week I will list the well known  key names in the docs.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #24 - Posted 2004-02-25 21:52:46 »

Greg is the one to consult, he has a much better idea of what it will take to get that to work.  He also as voiced an objection to "hacking" out the phantom second button  (I assume you saw that issue as well?), so I'm going to wait to read what he has to say.  He's not online at the moment, otherwise I would poke him with a stick and get his response.

Offline Jeff

JGO Coder




Got any cats?


« Reply #25 - Posted 2004-02-25 21:58:26 »

On the phantom second button issue I can see at elast two reasonable compromises....

(1) Add a property like jinput.osxplugin.nophantombutton
to control the hack

or

(2) Do a seperate plug in that returns the more
"cooked" versions of values.


Just suggestions guys whatever you decide is fine.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #26 - Posted 2004-02-25 22:12:31 »

I vote for (1).

Offline gregorypierce

Senior Devvie




I come upon thee like the blue screen of death....


« Reply #27 - Posted 2004-02-26 01:25:29 »

Quote
On the phantom second button issue I can see at elast two reasonable compromises....

(1) Add a property like jinput.osxplugin.nophantombutton
to control the hack

or

(2) Do a seperate plug in that returns the more
"cooked" versions of values.



You'll have to do something above the API. I have no idea that its a laptop trackpad. I don't even know that its actually a one button mouse. I only know that HID gave me a device that has two buttons. Nothing I can do at the API layer. It would have to be done at the application layer where someone can actually take a look at the device string and say 'ah a laptop trackpad, I will set this up to only have one button'

I'll go with B on that other requirement. I don't know key names - the OS doesn't tell me key names and they will vary based on keyboards for more than a few keys. There is no OS function called 'getKeyName( scanCode )' so this would have to be some form of keymap method hardcoded based on the scan codes.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #28 - Posted 2004-02-26 01:48:11 »

Quote
You'll have to do something above the API. I have no idea that its a laptop trackpad.

Hmm.. the device is called "Trackpad" and the controller name is "Trackpad buttons" - this is what ControllerReadTest shows me.  Is that not good enough?  Regardless, if we remain undecided on this one, I think we can leave this for a post 1.0 'bug' fix.

Quote

I'll go with B on that other requirement. I don't know key names - the OS doesn't tell me key names and they will vary based on keyboards for more than a few keys. There is no OS function called 'getKeyName( scanCode )' so this would have to be some form of keymap method hardcoded based on the scan codes.

That's what I thought based on the last time we discussed it.   It makes things very hard for us to deal with reliably.

Jeff, is there someone at Apple that you can get interested in this issue?  I can't imagine how their HID APIs are useful in the slightest for keyboard input if this is the case.  (How does the rest of Mac OS know what key has been pressed?  Is the keyboard hacked into the HID APIs but never actually used through HID?  A Logitech USB keyboard that I plugged in has the same problem.. yet I can use it to type - is there an undocumented API that does the translation?  Somewhere in the OS is the information we need... it would be a real shame if we can't get at it.  If we can get someone at Apple involved I'm sure they could get us what we need.

Offline Jeff

JGO Coder




Got any cats?


« Reply #29 - Posted 2004-02-26 15:14:48 »

Okay, we may have someone at Apple we can ping on these so I'll get on that in the next day or so (on the road today and tomorrow.)

On the KB yeah I was figuring it would require a hard-coded translation table.

JK

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Pages: [1] 2
  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.

SHC (24 views)
2014-11-25 12:00:59

SHC (23 views)
2014-11-25 11:53:45

Norakomi (22 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (68 views)
2014-11-07 19:57:14
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!