Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-31 23: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.
2  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-30 07: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).
3  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-30 06: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
4  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-30 05: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
5  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-28 21: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.
6  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-28 21: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)
7  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-28 20: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
8  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-28 06: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

9  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-28 05: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.

10  Java Game APIs & Engines / JInput / Re: 3 Small Questions from a New Guy on: 2005-08-25 22: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!
11  Java Game APIs & Engines / JInput / 3 Small Questions from a New Guy on: 2005-08-25 21: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!



Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (24 views)
2014-08-22 19:31:30

atombrot (34 views)
2014-08-19 09:29:53

Tekkerue (30 views)
2014-08-16 06:45:27

Tekkerue (28 views)
2014-08-16 06:22:17

Tekkerue (18 views)
2014-08-16 06:20:21

Tekkerue (27 views)
2014-08-16 06:12:11

Rayexar (65 views)
2014-08-11 02:49:23

BurntPizza (41 views)
2014-08-09 21:09:32

BurntPizza (33 views)
2014-08-08 02:01:56

Norakomi (42 views)
2014-08-06 19:49:38
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

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

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!