Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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  
  3 Small Questions from a New Guy  (Read 7354 times)
0 Members and 1 Guest are viewing this topic.
Offline TuringPest

Senior Newbie





« Posted 2005-08-25 23:53:15 »

First of all, I really want to thank you guys for developing JInput. It really works great
and I really appreciate all the time you put in to this project (I hope I can do something
with it that makes it all worth it, lol)

Im having one issue when i try to poll my mouse.

Here is some background info:
- Im using the 3 apps from the FreeFodder tutorial by Robert Schuster
- it is a Logitech USB TrackBall mouse
- There is no version number anywhere but i downloaded my JInput binaries between
     January and March of this year (2005)
- Im using windows xp pro

Here is the get controllers list:

run:
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] 0 - Mouse Mouse (mouse)
         [] 1 - Keyboard (Keyboard) (buttons)
         [] 2 - Saitek Cyborg Force Rumble Pad Saitek Cyborg Force Rumble Pad (stick)
         [] Create effect : DIERR_INVALIDPARAM
         [] Create effect : DIERR_INVALIDPARAM


Here is the details for controller 0 (the mouse)

run:
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] name: Mouse Mouse
         [] type: mouse
         [] port: Unknown
         [] subcontroller: 0
         [] name: Mouse Mouse ball
         [] type: ball
         [] port: Unknown
         [] axes:
         [] 0 - X-axis - x - relative - arbitrary - analog - 0.0
         [] 1 - Y-axis - y - relative - arbitrary - analog - 0.0
         [] subcontroller: 1
         [] name: Mouse Mouse buttons
         [] type: buttons
         [] port: Unknown
         [] axes:
         [] 0 - Button 0 - left - absolute - normalized - digital - 0.0
         [] 1 - Button 1 - right - absolute - normalized - digital - 0.0
         [] 2 - Button 2 - middle - absolute - normalized - digital - 0.0
         [] 3 - Button 3 - side - absolute - normalized - digital - 0.0
         [] 4 - Button 4 - extra - absolute - normalized - digital - 0.0
         [] Create effect : DIERR_INVALIDPARAM
         [] Create effect : DIERR_INVALIDPARAM

And this is the error i get if i try to poll anything (0-4) on the mouse

run:
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] The provided index is out of range for this controller.
         [] Use a value between 0 and -1
         [] Create effect : DIERR_INVALIDPARAM
         [] Create effect : DIERR_INVALIDPARAM


So, yea, i cant use the mouse.
The game controller and the keyboard work perfectly though.

My two other questions:
1 - i downloaded JInput for windows about 6 months ago.
     should i download a new version?

2 - is the only way to get game controller events to continuously poll in a timed thread
    like the tutorial example?
    Or is there a "Listener" type class that will return changes in the controller?

      // installs a timer which is activated every 10 ms
      new Timer(10, new ActionListener() {
         public void actionPerformed(ActionEvent ae) {
            // update all Axis instances of this controller
            controller.poll();
            
            // update the text field's contents
            pollField.setText(String.valueOf(axis.getPollData()));
         }
      }).start();


Thanks for reading and for any help!



Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2005-08-26 00:21:01 »

First of all, I really want to thank you guys for developing JInput. It really works great
and I really appreciate all the time you put in to this project (I hope I can do something
with it that makes it all worth it, lol)

Im having one issue when i try to poll my mouse.
<snip>

And this is the error i get if i try to poll anything (0-4) on the mouse

run:
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] The provided index is out of range for this controller.
         [] Use a value between 0 and -1
         [] Create effect : DIERR_INVALIDPARAM
         [] Create effect : DIERR_INVALIDPARAM

Mice are tricky ebcause they typically show up as two sub-controllers, one for the X and Y (0 in your case) and one for the buttons (1 in your case.)

You need to get the sub-controller and poll it, not poll the mouse itself. Are you doing this?

Quote
My two other questions:
1 - i downloaded JInput for windows about 6 months ago.
     should i download a new version?

It wouldnt hurt to use the latest released builds.  If your really brave you can download the CVS and build it but tehre's no gaurantee that the CVS is ina  release state at any given time.

Quote
2 - is the only way to get game controller events to continuously poll in a timed thread
    like the tutorial example?

By its nature JInput is a polled input API.  Most games want this as they simply poll once per frame.

Any sort of call-back mechanism yo uwoudl have to build untop of it by launching a thread that polls periodically and dispatches callbacks.


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 TuringPest

Senior Newbie





« Reply #2 - Posted 2005-08-26 00:49:11 »

Great! Thanks alot. Those were exactly the anwers i was looking for.
I dont believe i was polling the mouse's subcontroller.
The programs from the tutorial only polled regular controllers.
Thanks again for the clarification!
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 2005-08-26 06:17:16 »

My pleasure. Its a common mistake,. Even I made it once and I'm pretty much the "original author" of the API  Grin

(I say "pretty much" becasue a good friend of mine actually wrote most of it but I took it over when he left Sun, did a bit of cleanup and then released it )

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


Current project release date: sometime in 3003


« Reply #4 - Posted 2005-08-26 08:40:21 »

but I took it over when he left Sun, did a bit of cleanup and then released it )

Then I got hold of it and butchured it to death Smiley

The DIERR_INVALIDPARAM messages are a bit worrying, I'll have to have a dig into it, my guess from not looking at the code is that it's creating effects the device doesn't support. This is worrying as if I recall right, it only tries to create 2, weak rumble and strong rumble.

Guess i'll have to boot into windows tonight :/

Endolf

Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2005-08-26 23:48:06 »

but I took it over when he left Sun, did a bit of cleanup and then released it )

Then I got hold of it and butchured it to death Smiley

I'd put it "Then Jeremy took it over and really made it sing!"  Grin

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


Current project release date: sometime in 3003


« Reply #6 - Posted 2005-08-27 11:40:14 »

Hi

I've stuck a new jinput windows build up here, it's got some more rumbler debug statements in it, can you test it can send me the results please?

Thanks

Endolf

Offline TuringPest

Senior Newbie





« Reply #7 - Posted 2005-08-28 07:29:50 »

Oh wow, haha. I didnt realize there were more posts in here!
I came back to see if i could learn a little something from reading
the other posts.

>> The DIERR_INVALIDPARAM messages are a bit worrying, I'll have to have a dig into it

Yea. I didnt now what they meant - but everything was working well so I didnt worry about it.
My controller doesnt have rumblers or "effects".
I was kind of too ecstatic when i got the game controllers working at 2 in the morning to worry about it, haha.

>> I've stuck a new jinput windows build up here, it's got some more rumbler debug statements in it,
>> can you test it can send me the results please?

I dont know if that was directed towards me or jeff - but since he recommended i update
anyway - ill download a recent build and post the output i get.

Night guys. Thanks again for your great work and support.

Offline TuringPest

Senior Newbie





« Reply #8 - Posted 2005-08-28 08:04:32 »

Good News, Bad News.

Good News: Your debug statements came up
Bad News: You broke the 3 tutorial apps i was using, lol. Now the controller doesnt work.
It probably has something to do with the files in this build being named differently than the files
in the build i had.

The Build I Had
-----------------------
jinput.jar
jutils.jar
dxinput.jar
dxinput.dll

The Build I Downloaded from Your Link
----------------------------------------------------------
jinput.jar
jinput-dxplugin.dll



Also, I apparently DO have rumble on my controller and never noticed.
I also have a small button that says "digital" on it next to the small "rumble" button
and also a mysterious little red button thats never done anything.

For the eagle eyed youll see the list lists my controller #5 and later i call it with #2 -
I unplugged my keyboard and the index number changed.

Anyway, you broke it - now you fix it, haha!
Thanks again Guys.

Heres the ouput:

Listing Controllers
-----------------------------

C:\A\Java\JInput\TutorialOne2\src>ant listControllers
Buildfile: build.xml

listControllers:

init:

compile:

-determinePlugin:

run:
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] Creating Microsoft Wireless Optical Desktop« 2.10 polling = false
         [] Creating Microsoft Wireless Optical Desktop« 2.10 polling = false
         [] Creating Microsoft Wireless Optical Desktop« 2.10 polling = false
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] 0 - Mouse Mouse (mouse)
         [] 1 - Keyboard (Keyboard) (buttons)
         [] 2 - Microsoft Wireless Optical Desktop« 2.10 Microsoft Wireless Optical Desktop« 2.10 (stick)
         [] 3 - Microsoft Wireless Optical Desktop« 2.10 Microsoft Wireless Optical Desktop« 2.10 (stick)
         [] 4 - Microsoft Wireless Optical Desktop« 2.10 Microsoft Wireless Optical Desktop« 2.10 (stick)
         [] 5 - Saitek Cyborg Force Rumble Pad Saitek Cyborg Force Rumble Pad (stick)
         [] Reseting rumbler X Axis before exit
         [] Reseting rumbler Y Axis before exit
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Create effect : DIERR_INVALIDPARAM
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Create effect : DIERR_INVALIDPARAM



Controller Details
--------------------------------

C:\A\Java\JInput\TutorialOne2\src>ant controllerDetails -Dcontroller=2
Buildfile: build.xml

controllerDetails:

init:

compile:

-determinePlugin:

run:
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] Creating Saitek Cyborg Force Rumble Pad polling = true
         [] OS name is: Windows XP
         [] DX8 plugin is supported
         [] name: Saitek Cyborg Force Rumble Pad Saitek Cyborg Force Rumble Pad
         [] type: stick
         [] port: Unknown
         [] java.lang.NoSuchMethodError: net.java.games.input.Controller.getAxes()[Lnet/java/games/input/Axis;
         []     at net.java.games.input.tutorialone.ControllerDetails.print ControllerDetails(ControllerDetails.java:74)
         []     at net.java.games.input.tutorialone.ControllerDetails.main(ControllerDetails.java:46)
         [] Reseting rumbler X Axis before exit
         [] Reseting rumbler Y Axis before exit
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Create effect : DIERR_INVALIDPARAM
         [] Supported effects: Constant force Ramp force Periodic force Per
iodic force Periodic force Periodic force Periodic force Condition force Co
ndition force Condition force Condition force Custom force Hardware force H
ardware force Hardware force Hardware force
         [] Create effect : DIERR_INVALIDPARAM
         [] Exception in thread "main"
         [] Java Result: 1

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #9 - Posted 2005-08-28 10:49:17 »

Hi

Looks like you are using a fairly old build. That tutorial was written when we had some problems getting people up and running with it.

The build you are trying is the newer 'simple' builds, you'll find you have 1 jar and 1 dll, with the jar anywhere on your classpath, and the directory the dll is in being pointed to by java.library.path it will run fine.

eg.

say you have the following dir structure

appPath/bin
appPath/lib
appPath/src

where your own classes are compiled into bin (maybe in a jar), your source code for your own files is in src, and lib contains both the dll and the jinput.jar

just run java -cp <path to your own code>;appPath/lib/jinput.jar -Djava.library.path=appPath/lib/ <main class>

HTH

Thanks for running the tests, I can see that you have 4 axis that support effects, I only have two on the test stick I bought so I can't be certain, but I'll have a look. I'll have a hunt around and see if I can find out what other axis your devices supports and why it seems to cause jinput a problem.

Thanks

Endolf

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

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #10 - Posted 2005-08-28 11:35:10 »

Hi

Uploaded another build with some more debug to here. If this shows what I think it will, then I should be able to sort the problem. And my guess would be that you'll have 4 axis rumbling Smiley

Could you confirm which device you have. I think I can guess from the saitek website, but I'm not certain. I *think* it's the P2500.

Thanks

Endolf

Offline TuringPest

Senior Newbie





« Reply #11 - Posted 2005-08-28 22:16:00 »

Hey Endolf.

>> That tutorial was written when we had some problems getting people up and running with it.

Haha, just my luck. I got it working the first time i tried -
but the "easy" version stumps me.

Realistically I think the problem is the 3 apps from the tutorial.
I think they are throwing a lot of the errors.
So its not you, me or the builds.

The latest build didnt even get as far as listing the controllers.
I havent had time recently - but today i think ill take the time to write my own
demo app and my guess is that everything will work just fine.

Because, if you look at my last post (#8 i think) in the controller
details errors there is this line:

      [] java.lang.NoSuchMethodError: net.java.games.input.Controller.getAxes()[Lnet/java/games/input/Axis;
         []     at net.java.games.input.tutorialone.ControllerDetails.print ControllerDetails(ControllerDetails.java:74)
         []     at net.java.games.input.tutorialone.ControllerDetails.main(ControllerDetails.java:46)


Did you change any of the method names?
I think the app is trying to call a method that may have changed in the last 6 months
(my orig version was from around February 05).


>> I *think* it's the P2500.

I didnt check the site but the controller says P2500 on the
left controller arm so im *guessing* youre right, haha.
I didnt even know that, haha. I should have posted that before. Sorry.

>> Thanks for running the tests

Seriously - Thank You. Ill run as many tests as you need, haha.
Its well worth it. Im starting to write my first 3D app and the moment
i can use a controller to traverse the environment i think im going to
weep like a child, haha. So yea - thanks again, haha.


List Controllers
----------------------------

C:\A\Java\JInput\TutorialOne2\src>ant listControllers
Buildfile: build.xml

listControllers:

init:

compile:

-determinePlugin:

run:
         [] java.lang.UnsupportedClassVersionError: net/java/games/util/plugins/Plugins (Unsupported major.minor version 49.0)
         []     at java.lang.ClassLoader.defineClass0(Native Method)
         []     at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         []     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         []     at java.net.URLClassLoader.defineClass(URLClassLoader.java: 251)
         []     at java.net.URLClassLoader.access$100(URLClassLoader.java:5 5)
         []     at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         []     at java.security.AccessController.doPrivileged(Native Method)
         []     at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         []     at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         []     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         []     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         []     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         []     at net.java.games.input.ControllerEnvironment.<clinit>(ControllerEnvironment.java:73)
         []     at net.java.games.input.tutorialone.ListControllers.main(ListControllers.java:21)
         [] Exception in thread "main"
         [] Java Result: 1
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #12 - Posted 2005-08-28 22:55:55 »

because, if you look at my last post (#8 i think) in the controller
details errors there is this line:

      [] java.lang.NoSuchMethodError: net.java.games.input.Controller.getAxes()[Lnet/java/games/input/Axis;
         []     at net.java.games.input.tutorialone.ControllerDetails.print ControllerDetails(ControllerDetails.java:74)
         []     at net.java.games.input.tutorialone.ControllerDetails.main(ControllerDetails.java:46)


Did you change any of the method names?
I think the app is trying to call a method that may have changed in the last 6 months
(my orig version was from around February 05).

Ahhh

yeah, we actually changed the API, Axes implied it was for joysticks, but buttons and keys were sub classes, so we changed it so you now have components.

There are javadocs on the jinput.dev.java.net files section, I can upload uncompressed ones to newdawnsoftware if people want.

Quote
         [] java.lang.UnsupportedClassVersionError: net/java/games/util/plugins/Plugins (Unsupported major.minor version 49.0)

damn damn damn. Sorry, thats my fault. Looks like i forgot to commit the changes to the build files so that it builds 1.4 compatable code. I'm using 1.5.

I've uploaded a new copy of the file, and updated the ant scripts.

If you download the zip, and extract the 2 files, then in the directory you extracted them to run
1  
java -cp jinput.jar -Djava.library.path=. net.java.games.input.test.ControllerReadTest
it will run the test that come with jinput, there are also ControllerTextTest and RumbleTest tests in the jar.

HTH

Endolf

Offline TuringPest

Senior Newbie





« Reply #13 - Posted 2005-08-28 23:22:31 »

>> I've uploaded a new copy of the file, and updated the ant scripts.
>> If you download the zip, and extract the 2 files

Er - youre going to have to forgive me - download from where?
What ant scripts?
https://jinput.dev.java.net/ ?
In the "docs and files" i only saw 8-24-05 as the latest version.

Just in case i downloaded that one and I redownloaded the zip from the last
link you posted (in case it pointed to a new zip) and ran both of them and
got the same error message.

>> There are javadocs on the jinput.dev.java.net files section,
>> I can upload uncompressed ones to newdawnsoftware if people want.

What is newdawnsoftware?

>> it will run the test that come with jinput,

Sorry! I didnt know there were built in tests. i would have ran those
instead of that old tutorial had i known!

I was going to upgrade to 1.5 anyway.
This is a dumb question im sure - but i can still write 1.4.2 compatible code
with 1.5 right?

Thanks again!


Run (same message for both downloads)
---------------------------------------------------------------

C:\A\Java\JInput\JInput 8-28\2>java -cp jinput.jar -Djava.library.path=. ne
t.java.games.input.test.ControllerReadTest
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/java
/games/util/plugins/Plugins (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.ja
va:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at net.java.games.input.ControllerEnvironment.<clinit>(ControllerEn
vironment.java:73)
        at net.java.games.input.test.ControllerReadTest.<init>(ControllerRe
adTest.java:249)
        at net.java.games.input.test.ControllerReadTest.main(ControllerRead
Test.java:299)
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #14 - Posted 2005-08-28 23:36:48 »

Hi

newdawnsoftware is where most of the jinput files end up. It's a server a friend and I run www.newdawnsoftware.com. The zip I gave you the other day came from there. jinput.dev.java.net just points to those files for some of them Smiley. I've not bothered updating the link on jinput as these builds for you are just debug builds.

You can build 1.4 compatable code with 1.5, the target="1.4" option should do it.

In case there is a cache or something in between, I've copied it to a new fille here.

Endolf.

P.S.

Check your personal messages Smiley

Offline TuringPest

Senior Newbie





« Reply #15 - Posted 2005-08-28 23:49:46 »

I downloaded from tht link and got the same error from the last times.
Is it that i am using 1.4?

Ill update to 1.5 (but other people im writing code with are using
1.4 so the JInput code will still have to work for them anyway).

what is the -  target="1.4" option?
I wont have to type that everytime i want to compile
something will i?

Sorry for the "noobish" questions, haha. Thanks!
I sent you a PM.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #16 - Posted 2005-08-29 14:15:20 »

Hi

Right, i've installed 1.4.2_09 on my windows box and actually read the error log you posted. It was jutils as well that needed rebuilding. I've done that, and uploaded a new dist here. I've tested it myself too Smiley

It now works with 1.4 Smiley

Endolf

Offline Jeff

JGO Coder




Got any cats?


« Reply #17 - Posted 2005-08-30 01:54:11 »

I downloaded from tht link and got the same error from the last times.
Ill update to 1.5 (but other people im writing code with are using
1.4 so the JInput code will still have to work for them anyway).

what is the -  target="1.4" option?
I wont have to type that everytime i want to compile
something will i?


yeah if your working with 1.5 aqnd you need to share class fiels with 1,4 users you'll have to tell the compiler that every time you compile.

Luckily most IDE's have somepalce  in the p[roject you cna set thisonce and then forget it.

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 TuringPest

Senior Newbie





« Reply #18 - Posted 2005-08-30 07:43:44 »

Endolf,
You're a god. All is working perfectly.
Mouse, Controller, Keyboard - all great.
The first time i ran the test i got 4 of these on the command line:
DI_BUFFEROVERFLOW
But the 2 times afterwards i only got that message once.
I dont know what that means - but like i said everything worked perfectly.
Im exhausted, today was a VERY long day, haha.
I can sleep well knowing this works great.
Thanks again for all your help!

Jeff,
I think im going to update to 1.5.
I write code in TextPad and i checked and it has a parameter line for the
compiler so youre right - i think i can add that option in
there and not even have to worry about it.
Thank god, haha.


C:\A\Java\JInput\JInput 8-29>java -cp jinput.jar -Djava.library.path=. net.
java.games.input.test.ControllerReadTest
OS name is: Windows XP
DX8 plugin is supported
OS name is: Windows XP
DX8 plugin is supported
Creating Saitek Cyborg Force Rumble Pad polling = true
Supported effects: Constant force Ramp force Periodic force Periodic force
Periodic force Periodic force Periodic force Condition force Condition forc
e Condition force Condition force Custom force Hardware force Hardware forc
e Hardware force Hardware force
effect is in the x axis
Supported effects: Constant force Ramp force Periodic force Periodic force
Periodic force Periodic force Periodic force Condition force Condition forc
e Condition force Condition force Custom force Hardware force Hardware forc
e Hardware force Hardware force
effect is in the y axis
Supported effects: Constant force Ramp force Periodic force Periodic force
Periodic force Periodic force Periodic force Condition force Condition forc
e Condition force Condition force Custom force Hardware force Hardware forc
e Hardware force Hardware force
effect is in the rx axis
Create effect : DIERR_INVALIDPARAM
Supported effects: Constant force Ramp force Periodic force Periodic force
Periodic force Periodic force Periodic force Condition force Condition forc
e Condition force Condition force Custom force Hardware force Hardware forc
e Hardware force Hardware force
effect is in the z axis
Create effect : DIERR_INVALIDPARAM
Component count = 2
Component count = 5
Component count = 124
Component count = 17
DI_BUFFEROVERFLOW
Offline TuringPest

Senior Newbie





« Reply #19 - Posted 2005-08-30 08:27:39 »

Endolf,
There is a bad error when running the test with my wireless keyboard.
I never had the keyboard plugged in at the same time as the controller
so i never noticed.
I just downloaded the source code for the ControllerReadTest,
compiled it and ran it.
I got the error (listed below) that just repeated over and over so it
jammed everything else.
I disabled the wireless desktop and it worked perfectly like before.
Then I disabled the wireless mouse so i know its definitely the wireless keyboard.

From reading the error - it must be trying to poll something out of bounds
which is why the error repeats every time there is a poll.

The keyboard is a Microsoft Wireless Comfort Keyboard 1.0A Model 1027
http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=028

yup, thats right - a tilting scroll wheel on the mouse.
im living the dream.

java.lang.ArrayIndexOutOfBoundsException: 165
        at net.java.games.input.DirectInputAxis.getPollData(DirectInputAxis
.java:148)
        at net.java.games.input.test.AxisPanel.poll(ControllerReadTest.java
:74)
        at net.java.games.input.test.ControllerWindow.poll(ControllerReadTe
st.java:235)
        at net.java.games.input.test.ControllerReadTest$1.run(ControllerRea
dTest.java:262)
        at java.lang.Thread.run(Thread.java:534)
java.lang.ArrayIndexOutOfBoundsException: 166
        at net.java.games.input.DirectInputAxis.getPollData(DirectInputAxis
.java:148)
        at net.java.games.input.test.AxisPanel.poll(ControllerReadTest.java
:74)
        at net.java.games.input.test.ControllerWindow.poll(ControllerReadTe
st.java:235)
        at net.java.games.input.test.ControllerReadTest$1.run(ControllerRea
dTest.java:262)
        at java.lang.Thread.run(Thread.java:534)

Repeating Indefinitely
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #20 - Posted 2005-08-30 08:52:39 »

Hi

Right

Cool that it worked to start with Smiley

You do indeed have 4 rumblers in that beast. I think its a trivial task to get it working, but have no way of testing it.

The DI_BUFFEROVERFLOW is because direct input buffers up all it's events untill you call a poll, if the device fills the buffer up before you do that, you get an overflow, i've already increased the buffer size, but I can do so again if we need too, although I suspect that only happened on startup before you did the first poll.

As for the keyboard issue, I'll take a good look tonight, that was with the new code i've been sending you not the old code wasn't it?

Endolf

Offline TuringPest

Senior Newbie





« Reply #21 - Posted 2005-08-30 09:03:58 »

Yea those tests were with the brand new code (the 8-29.zip).
I dont need the rumblers to work - remember i didnt even
know i had rumblers, haha.
Id be glad to help you by testing anything though if youre
resolved to fix that problem.

The code works perfect.
The keyboard thing isnt a big deal for me because ill never
have any reason to poll the wireless keyboard.
I thought i would mention the error though in case it causes
some else any problems.
Is there a built-in max for the number of keys a keyboard can have?
This keyboard seems to have a lot of buttons maybe thats the issue?
Also, how would JInput even handle the "zoom slider" thing-a-ma-bob
on the keyboard?
Hmm, that actually would be a bad-ass thing to incorporate into a game, lol.

Anyway, jesus man isnt like 6am where you are?
Its 3 am, im off to bed.
Ill check in tomm (or rather tonight).
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #22 - Posted 2005-08-30 13:39:01 »

Nah

I'm 5 hours ahead of you, so it was about 8am when I posted.

Try
1  
java -cp jinput.jar -Djava.library.path=. net.java.games.input.test.RumbleTest
or
1  
java -cp jinput.jar -Djava.library.path=. net.java.games.input.test.RumblerTest
(I'm at work and can't remember if it is Rumble or Rumbler), you should get two rumble tests already Smiley, by the time you get in from work/collage or what ever you do during the day, you should have 4 Smiley.

It's just another toy to play with Smiley

Endolf

Offline TuringPest

Senior Newbie





« Reply #23 - Posted 2005-09-01 01:37:08 »

Awesome! I havent had the time to work on anything ive wanted to.
Im exhausted from work (and planning to move) -
and yes, making the occasional collage ; )

Out of curiosity (and certainly not necessity) any news about the keyboard errors?

Ill get back here this weekend - I have a 3D model to make --- exhausting.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #24 - Posted 2005-09-01 08:34:19 »

Hi

Sorry, nope. Tuesday evening I was working on the Linux rumbler code, and last night we had power issues all night. It's typical that the battery on the UPS died about a week ago, so when the power went, my machines just stopped. Otherwise I could have carried on working Smiley, not for the first time Smiley.

So, if anyone has a good battery for a APC smart UPS 1400 going, let me know Smiley

Endolf

Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #25 - Posted 2005-09-01 22:58:53 »

Hi

Updated the windows build here. This adds an attempt (can't test it) at supporting more than 2 rumblers on a device, and some more debug for TuringPest's keyboard issue.

I'm not sure about the 4'th axis on the mouse. I've done a quick google and got nothing about dealing with it, like where the data is in the directx layer. The directx 8 mouse object doesn't have any info on it. At the moment jinput on windows run on dx8, so unless I find something that says it's dx9 only, i'm not sure what to do (apart from more googling Tongue).

It's something to be getting on and testing for you TuringPest though Smiley

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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (26 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (34 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!