Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (527)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
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  
  Not seeing my gamepad  (Read 3953 times)
0 Members and 1 Guest are viewing this topic.
Offline robotfire

Senior Newbie





« Posted 2007-07-23 15:45:21 »

Hi,

Before I say anything else, I would like to say that this project is incredible.  I am working on a team that may control a hovercraft via a joystick, and this is exactly what I needed.  I see that it is very responsive, and I should be able to easily send the data straight to the craft via sockets.

Now on to my problem:  I have a Gravis Gamepad Pro that I brought in from home.  The computer sees the gamepad just fine.  However, jinput only sees the mouse and keyboard (no gamepad!!).  What can I do to troubleshoot a problem like this?  Is this gamepad not acceptable?  What gamepad do you recommend?

Again, this is just phenomenal.  I am thrilled that this exists.

Clint
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #1 - Posted 2007-07-23 15:52:40 »

See if this demo works:
http://lwjgl.org/jnlp/lwjgl-demo.php/test.input.TestControllers

弾幕 ☆ @mahonnaiseblog
Offline robotfire

Senior Newbie





« Reply #2 - Posted 2007-07-23 16:31:15 »

Unfortunately, I can't run that program from here.  I get an error (probably because of security here).  Is there another way to debug this sort of problem?  I will try that link when I get home to see if I have any luck there.

I put my code in exactly the way it says to in the "Getting Started" section.  I only see mouse and keyboard for inputs.  I have Mouse with x-axis, y-axis, button 0 and button 1.  I have keyboard with 126 components.  I have nothing else!

It is a USB gamepad.  Could that be the problem?

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

Senior Newbie





« Reply #3 - Posted 2007-07-23 16:36:38 »

Also of note: When I do:

    Controller[] ca = ControllerEnvironment.getDefaultEnvironment().getControllers();

I get two devices found in the debugger (DIMouse (0) and DIKeyboard(1)).  I may just need to try other gamepads, or I may need to try a different computer.  I am running on Windows NT if that means anything.  My gamepad is definitely there when I go to "Gaming Options" in the Control Panel.
Offline robotfire

Senior Newbie





« Reply #4 - Posted 2007-07-23 17:52:41 »

I tried that demo on another computer, and it worked perfectly.  Can I have the source code for that???

Clint
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #5 - Posted 2007-07-23 18:10:09 »

http://java-game-lib.svn.sourceforge.net/viewvc/java-game-lib/trunk/LWJGL/src/java/org/lwjgl/test/input/TestControllers.java?view=log&content-type=text%2Fvnd.viewcvs-markup&pathrev=HEAD

Note: It doesn't use JInput directly. LWJGL uses some kind of JInput wrapper.

弾幕 ☆ @mahonnaiseblog
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #6 - Posted 2007-07-23 18:31:37 »

I´m on holiday atm, so I apologise for the late response.

What OS are you using?, which version of JInput?

If it´s Windows, check that dxdiags reports the controller happily. If it´s linux, check you have read access to the /dev/input/event* device node that represents the controller.

HTH

Endolf

P.S. It might be 48-72 hours before I next have net access.

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #7 - Posted 2007-07-23 18:40:06 »

Another demo is here. And the source for that is in the jinput cvs over at jinput.dev.java.net

That one is pure jinput, and should be up to date.

HTH

Endolf

Offline robotfire

Senior Newbie





« Reply #8 - Posted 2007-07-23 19:12:03 »

Trying another joystick, I still get the same result (not showing the gamepad, but showing keyboard and mouse).  However, it IS in the "Input" tab of the DirectX Diagnostic Tool.   I see "Mouse", "Keyboard", and "SideWinder Joystick" all in the DirectX Diagnostic tool.

I am using Windows 2000. 

The distribution was downloaded today, and it is named "jinput_combined_dist_latest".

Thank you so much for the help and the awesome project.  It's incredible!

Clint
Offline robotfire

Senior Newbie





« Reply #9 - Posted 2007-07-24 11:49:58 »

I got it working using the lwjgl library.  You guys obviously know more about it than I do, but my guess is the problem with the jinput "getting started" section is there isn't a mention of creating the controllers.  In lwjgl, there is a create() method which creates my controllers.

I don't know if a "create()" method exists for jinput or not, but either way, this library is now working for me (through lwjgl), and it's just incredible.

Thanks again!!!!!

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

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #10 - Posted 2007-07-26 10:57:02 »

Hi

It sounds like I've broken something, the latest version of LWJGL is not using the latest version of JInput last time I checked (It's not that old, but they don't update it every single time JInput does).

JInput has no create method, you just call the getControllers method to get all the ones JInput knows about.

I have a hunch, but I'll have to investigate, let me get back to you.

Cheers

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #11 - Posted 2007-07-26 13:59:17 »

Hi

I can reproduce this now, fairly major screw up on my part I would say Smiley, I'll work on it this afternoon if all goes to plan.

Endolf

Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #12 - Posted 2007-07-26 15:01:24 »

Hi

Looks like it was a build problem. I've updated the webstart demo and uploaded a new distribution here

That should work.

Let me know Smiley

Endolf

Offline robotfire

Senior Newbie





« Reply #13 - Posted 2007-08-07 11:28:02 »

Endolf, you are the man!  I don't know what sort of sorcery you are performing to do this, but the API is fantastic.

Clint
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #14 - Posted 2007-08-07 17:29:01 »

Hi

I wouldn't go that far, but it's always nice to hear when ones work is appreciated Smiley.

I would like to say that there have been other participants in JInput. Including in no particular order, Michael Martak, Thomas Daniel, Jeff Kesselman, Gregory Pierce and Elias Naur.

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.

PocketCrafter7 (12 views)
2014-11-28 16:25:35

PocketCrafter7 (8 views)
2014-11-28 16:25:09

PocketCrafter7 (8 views)
2014-11-28 16:24:29

toopeicgaming1999 (75 views)
2014-11-26 15:22:04

toopeicgaming1999 (65 views)
2014-11-26 15:20:36

toopeicgaming1999 (15 views)
2014-11-26 15:20:08

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

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

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

Gibbo3771 (28 views)
2014-11-24 19:59:16
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!