Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
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: Using a gamepad with jinput on: 2009-12-16 01:59:03
OK, now I get the input ...what I press on the controller. I can nicely use the rumblers. (though it shows I have 5 rumblers, but afaik my controller has only 2...whatever)


My (hopefully) last problem:

I repeatedly print which controllers my Programm can see.
It looks something like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
while (true) {
    Controller[] controllers = ControllerEnvironment.getDefaultEnvironment().getControllers();
    for (Controller cont : controllers) {
        System.out.println(cont.getName());
    }

    //here are some lines for polling and printing out data

}


The problem is when I unplug my gamepad it still appears in the list but can't be polled anymore(of course...its not there). When I replug it, it still can't be polled. As well its not found as a new one. The only thing I can do about this so far is restarting my programm.
Is there anything I can do about this? Am I doing something wrong? I don't want to have to restart my programm to find new gamepads, or a repluged one.
2  Java Game APIs & Engines / JInput / Re: Using a gamepad with jinput on: 2009-12-15 08:51:21
Thx....this really helped.

There is one problem left (and I searched for a long time): I can find and use the rumblertest...but how do I acces the rumbler myself? Is there a topic somewhere I was too blind to find?
3  Java Game APIs & Engines / JInput / Using a gamepad with jinput on: 2009-12-12 21:17:31
Hello,

I'm trying to use my X-Box gamepad for input. I found this should be possible with the library jinput.
I can detect my gamepad with this library, but thats about it.the hole lot of example code I found won't work. I guess the problem is that the tutorials I found are to old. Jinput has changed over time.

So, how do I get startet best with this? Where do I find stuff that helps (for the current version)?


Thx Wink
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Try the Free Demo of Revenge of the Titans

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (85 views)
2013-05-17 21:29:12

alaslipknot (93 views)
2013-05-16 21:24:48

gouessej (125 views)
2013-05-16 00:53:38

gouessej (118 views)
2013-05-16 00:17:58

theagentd (128 views)
2013-05-15 15:01:13

theagentd (115 views)
2013-05-15 15:00:54

StreetDoggy (159 views)
2013-05-14 15:56:26

kutucuk (181 views)
2013-05-12 17:10:36

kutucuk (181 views)
2013-05-12 15:36:09

UnluckyDevil (188 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.077 seconds with 21 queries.