Some notes on joysticks

I recently added joystick support to my game which works great so far.
I have noticed some things, maybe you can tell me if I’m heading into the right direction.

  1. I added my joystick to a custom file joystick-mapping.properties
    I simply copied the XBOX wireless entry for my wired controller: “XBOX 360 For Windows”.
    Why aren’t there tons of joystick entries? Are all other joysticks compatible? Is it the wrong file?

  2. The example TestJoystick.java works so far with the XBOX controller.

    My second joystick (Speedlink Hornet) has several X axes, and I have to use
    axis == axis.getJoystick().getAxis(JoystickAxis.X_AXIS)
    instead of
    axis != axis.getJoystick().getXAxis()
    What’s the difference?
    Is my check OK or will it break the compatibility with other joysticks?

  3. To support the XBOX trigger buttons I added this line to joystick-mapping.properties
    Controller\ (XBOX\ 360\ For\ Windows).z=trigger
    and some custom code to TestJoystick.java.
    Is it a good idea? I think it is not possible to detect that both buttons are pressed: Only one axis for two buttons.

  4. I’m using the analog left stick of the XBOX controller to move the player in onAction().
    I had to change the dead zone. Otherwise onAction(…, false, …) is missing sometimes:
    joy.getAxis(JoystickAxis.X_AXIS).assignAxis(“Right”, “Left”);
    joy.getAxis(JoystickAxis.Y_AXIS).assignAxis(“Down”, “Up”);
    inputManager.addListener(this, “Left”, “Right”, “Down”, “Up”);
    inputManager.setAxisDeadZone(0.5f); // default is 0.05f
    Is this OK?

  1. We only get the mappings people submit and so far all of the 6 or 7 joysticks I bought to test worked. I didn’t but any XBox controllers because I’m allergic to spending money on MS products when I can avoid it.

  2. I would have to have some information. Really, any information… about what the values of those things actually are.

  3. I don’t understand why you needed to do this. They are either a Z axis or they aren’t. What does the logging say they are in the TestJoystick app when you haven’t hacked it?

  4. Missing false when you recenter? Or missing false when you move from one spot to another?

Also, what version of JME are you running as this last issue feels familiar and old at the same time.

  1. I gave up. Steam requires it and I was tired of xbox360ce, although it’s a fine tool.

  2. I added some debug output to the unmodified TestJoystick.java in setAxisValue():

Axis:X Axis=-1.0
DEBUG: JoystickAxis[name=X Axis, parent=USB Gamepad , id=1, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]=axis
DEBUG: JoystickAxis[name=X Axis, parent=USB Gamepad , id=4, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]=axis.getJoystick().getXAxis()
DEBUG: JoystickAxis[name=X Axis, parent=USB Gamepad , id=1, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]=axis.getJoystick().getAxis(JoystickAxis.X_AXIS)

Looks like that getAxis() returns the last X axis and getAxis(JoystickAxis.X_AXIS) the first X axis.
Even worse the X axis with id=4 sends an impulse once at the beginning. So the joystick seems to pull left in the visualization.

  1. If I don’t rename the Z axis, the triggers will move the right stick. Not the expected behavior.
    So my idea was to rename it and add custom code.

If I press the left trigger without releasing. Nothing surprising:

Axis:Y Axis=-0.015274286
Axis:X Axis=0.0068513155
Axis:Y Rotation=0.019699454
Axis:X Rotation=-0.096086085
Axis:Z Axis=0.12108028
Axis:Y Rotation=0.022964835
Axis:Z Axis=0.36717784
Axis:X Rotation=-0.099229395
Axis:Z Axis=0.67971313
Axis:X Rotation=-0.096086085
Axis:Z Axis=0.99612427

  1. Missing false when I recenter. If I recenter very smoothly the event occurs.

The version I used is jME3_2013-09-30. I promise to try a newer version…

Thanks for your quick reply. And sorry that I don’t use the code tag, but an EDIT button is missing. :frowning:

jME3_2013-10-11 shows the same results regarding JoystickTest.java

I forgot to say that my cheap SpeedLink Hornet ("USB Gamepad ") behaves correctly with this code:

[java]
joy.getAxis(JoystickAxis.X_AXIS).assignAxis(“Right”, “Left”);
joy.getAxis(JoystickAxis.Y_AXIS).assignAxis(“Down”, “Up”);
[/java]

It seems that this API uses another technique than the example raw listener.
I’m not sure what this implies. Prefer assignAxis()?

If you could… before you’ve done any manual remapping or whatever…

Can you call getAxes() on the joystick and then iterate over that and dump it to console and paste it all here? Maybe do it with the buttons, too.

If you really want to get fancy, you could turn logging level up to FINE (at least for com.jme3.lwjgl.input.JInputJoyInput) to see what it says as it’s building the joystick wrappers.

Bonus points if you can somehow detail which button/axis on the joystick map to which entries in the log/console output. (A numbered picture would be worth a lot here.)

Without being able to hold and test one of these myself, my options are limited.

XBOX controller:

[java]
Joystick[0]:Controller (XBOX 360 For Windows)
buttons:10
JoystickButton[name=Button 0, parent=Controller (XBOX 360 For Windows), id=0, logicalId=0]
JoystickButton[name=Button 1, parent=Controller (XBOX 360 For Windows), id=1, logicalId=1]
JoystickButton[name=Button 2, parent=Controller (XBOX 360 For Windows), id=2, logicalId=2]
JoystickButton[name=Button 3, parent=Controller (XBOX 360 For Windows), id=3, logicalId=3]
JoystickButton[name=Button 4, parent=Controller (XBOX 360 For Windows), id=4, logicalId=4]
JoystickButton[name=Button 5, parent=Controller (XBOX 360 For Windows), id=5, logicalId=5]
JoystickButton[name=Button 6, parent=Controller (XBOX 360 For Windows), id=6, logicalId=6]
JoystickButton[name=Button 7, parent=Controller (XBOX 360 For Windows), id=7, logicalId=7]
JoystickButton[name=Button 8, parent=Controller (XBOX 360 For Windows), id=8, logicalId=8]
JoystickButton[name=Button 9, parent=Controller (XBOX 360 For Windows), id=9, logicalId=9]
axes:8
JoystickAxis[name=Y Axis, parent=Controller (XBOX 360 For Windows), id=0, logicalId=y, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Axis, parent=Controller (XBOX 360 For Windows), id=1, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=Y Rotation, parent=Controller (XBOX 360 For Windows), id=2, logicalId=ry, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Rotation, parent=Controller (XBOX 360 For Windows), id=3, logicalId=rx, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=Z Axis, parent=Controller (XBOX 360 For Windows), id=4, logicalId=z, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=Hat Switch, parent=Controller (XBOX 360 For Windows), id=5, logicalId=pov, isAnalog=false, isRelative=false, deadZone=0.0]
JoystickAxis[name=pov_x, parent=Controller (XBOX 360 For Windows), id=6, logicalId=pov_x, isAnalog=false, isRelative=false, deadZone=0.0]
JoystickAxis[name=pov_y, parent=Controller (XBOX 360 For Windows), id=7, logicalId=pov_y, isAnalog=false, isRelative=false, deadZone=0.0]
[/java]

LOG:
[java]
2013-10-13 10:42:07.095 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “Controller (XBOX 360 For Windows)”
2013-10-13 10:42:07.119 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Y Axis” id:y
2013-10-13 10:42:07.124 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:y to:y
2013-10-13 10:42:07.126 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Axis” id:x
2013-10-13 10:42:07.128 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:x to:x
2013-10-13 10:42:07.130 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Y Rotation” id:ry
2013-10-13 10:42:07.131 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:ry to:ry
2013-10-13 10:42:07.133 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Rotation” id:rx
2013-10-13 10:42:07.134 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:rx to:rx
2013-10-13 10:42:07.136 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Z Axis” id:z
2013-10-13 10:42:07.137 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:z to:z
2013-10-13 10:42:07.139 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 0” id:0
2013-10-13 10:42:07.140 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:0 to:0
2013-10-13 10:42:07.143 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 1” id:1
2013-10-13 10:42:07.145 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:1 to:1
2013-10-13 10:42:07.147 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 2” id:2
2013-10-13 10:42:07.148 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:2 to:2
2013-10-13 10:42:07.150 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 3” id:3
2013-10-13 10:42:07.151 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:3 to:3
2013-10-13 10:42:07.152 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 4” id:4
2013-10-13 10:42:07.154 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:4 to:4
2013-10-13 10:42:07.155 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 5” id:5
2013-10-13 10:42:07.156 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:5 to:5
2013-10-13 10:42:07.158 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 6” id:6
2013-10-13 10:42:07.159 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:6 to:6
2013-10-13 10:42:07.160 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 7” id:7
2013-10-13 10:42:07.162 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:7 to:7
2013-10-13 10:42:07.163 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 8” id:8
2013-10-13 10:42:07.165 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:8 to:8
2013-10-13 10:42:07.166 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 9” id:9
2013-10-13 10:42:07.167 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:9 to:9
2013-10-13 10:42:07.168 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Hat Switch” id:pov
2013-10-13 10:42:07.170 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:pov to:pov
2013-10-13 10:42:07.171 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “pov_x” id:pov_x
2013-10-13 10:42:07.172 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “pov_y” id:pov_y
2013-10-13 10:42:07.174 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:42:07.175 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Consumer Control” id:0
2013-10-13 10:42:07.177 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:0 to:0
2013-10-13 10:42:07.178 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Numeric Key Pad” id:1
2013-10-13 10:42:07.179 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:1 to:1
2013-10-13 10:42:07.180 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 2” id:2
2013-10-13 10:42:07.182 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:2 to:2
2013-10-13 10:42:07.183 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 3” id:3
2013-10-13 10:42:07.186 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:3 to:3
2013-10-13 10:42:07.188 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 4” id:4
2013-10-13 10:42:07.192 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:4 to:4
2013-10-13 10:42:07.193 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 5” id:5
2013-10-13 10:42:07.194 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:5 to:5
2013-10-13 10:42:07.195 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 6” id:6
2013-10-13 10:42:07.197 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:6 to:6
2013-10-13 10:42:07.202 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 7” id:7
2013-10-13 10:42:07.203 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:7 to:7
2013-10-13 10:42:07.204 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 8” id:8
2013-10-13 10:42:07.206 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:8 to:8
2013-10-13 10:42:07.207 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 9” id:9
2013-10-13 10:42:07.208 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:9 to:9
2013-10-13 10:42:07.209 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 10” id:10
2013-10-13 10:42:07.211 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:10 to:10
2013-10-13 10:42:07.212 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 11” id:11
2013-10-13 10:42:07.213 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:11 to:11
2013-10-13 10:42:07.214 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 12” id:12
2013-10-13 10:42:07.215 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:12 to:12
2013-10-13 10:42:07.217 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 13” id:13
2013-10-13 10:42:07.218 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:13 to:13
2013-10-13 10:42:07.219 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 14” id:14
2013-10-13 10:42:07.220 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:14 to:14
2013-10-13 10:42:07.221 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 15” id:15
2013-10-13 10:42:07.223 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:15 to:15
2013-10-13 10:42:07.224 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 16” id:16
2013-10-13 10:42:07.228 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:16 to:16
2013-10-13 10:42:07.230 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 17” id:17
2013-10-13 10:42:07.231 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:17 to:17
2013-10-13 10:42:07.232 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 18” id:18
2013-10-13 10:42:07.233 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:18 to:18
2013-10-13 10:42:07.235 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 19” id:19
2013-10-13 10:42:07.236 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:19 to:19
2013-10-13 10:42:07.238 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 20” id:20
2013-10-13 10:42:07.239 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:20 to:20
2013-10-13 10:42:07.240 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 21” id:21
2013-10-13 10:42:07.241 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:21 to:21
2013-10-13 10:42:07.246 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 22” id:23
2013-10-13 10:42:07.247 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:23 to:23
2013-10-13 10:42:07.248 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 23” id:24
2013-10-13 10:42:07.250 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:24 to:24
2013-10-13 10:42:07.251 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 24” id:25
2013-10-13 10:42:07.252 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:25 to:25
2013-10-13 10:42:07.253 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 25” id:26
2013-10-13 10:42:07.254 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:26 to:26
2013-10-13 10:42:07.255 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 26” id:27
2013-10-13 10:42:07.256 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:27 to:27
2013-10-13 10:42:07.257 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 27” id:28
2013-10-13 10:42:07.258 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:28 to:28
2013-10-13 10:42:07.259 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 28” id:29
2013-10-13 10:42:07.260 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:29 to:29
2013-10-13 10:42:07.261 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 29” id:30
2013-10-13 10:42:07.278 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:30 to:30
2013-10-13 10:42:07.279 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 30” id:31
2013-10-13 10:42:07.280 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:31 to:31
2013-10-13 10:42:07.281 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
2013-10-13 10:42:07.282 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:42:07.284 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
2013-10-13 10:42:07.285 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:42:07.286 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
[/java]

Speedlink Hornet:

[java]
Joystick[0]:USB Gamepad
buttons:10
JoystickButton[name=Button 0, parent=USB Gamepad , id=0, logicalId=0]
JoystickButton[name=Button 1, parent=USB Gamepad , id=1, logicalId=1]
JoystickButton[name=Button 2, parent=USB Gamepad , id=2, logicalId=2]
JoystickButton[name=Button 3, parent=USB Gamepad , id=3, logicalId=3]
JoystickButton[name=Button 4, parent=USB Gamepad , id=4, logicalId=4]
JoystickButton[name=Button 5, parent=USB Gamepad , id=5, logicalId=5]
JoystickButton[name=Button 6, parent=USB Gamepad , id=6, logicalId=6]
JoystickButton[name=Button 7, parent=USB Gamepad , id=7, logicalId=7]
JoystickButton[name=Button 8, parent=USB Gamepad , id=8, logicalId=8]
JoystickButton[name=Button 9, parent=USB Gamepad , id=9, logicalId=9]
axes:6
JoystickAxis[name=Y Axis, parent=USB Gamepad , id=0, logicalId=y, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Axis, parent=USB Gamepad , id=1, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Axis, parent=USB Gamepad , id=2, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Axis, parent=USB Gamepad , id=3, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=X Axis, parent=USB Gamepad , id=4, logicalId=x, isAnalog=true, isRelative=false, deadZone=0.0]
JoystickAxis[name=Axis 9, parent=USB Gamepad , id=5, logicalId=unknown, isAnalog=true, isRelative=false, deadZone=0.0]
[/java]

LOG:
[java]
2013-10-13 10:45:16.152 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: "USB Gamepad "
2013-10-13 10:45:16.176 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Y Axis” id:y
2013-10-13 10:45:16.181 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:y to:y
2013-10-13 10:45:16.183 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Axis” id:x
2013-10-13 10:45:16.184 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:x to:x
2013-10-13 10:45:16.186 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Axis” id:x
2013-10-13 10:45:16.188 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:x to:x
2013-10-13 10:45:16.189 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Axis” id:x
2013-10-13 10:45:16.191 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:x to:x
2013-10-13 10:45:16.193 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “X Axis” id:x
2013-10-13 10:45:16.194 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:x to:x
2013-10-13 10:45:16.196 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Adding axis: “Axis 9” id:unknown
2013-10-13 10:45:16.197 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addAxis Remapped:unknown to:unknown
2013-10-13 10:45:16.199 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 0” id:0
2013-10-13 10:45:16.201 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:0 to:0
2013-10-13 10:45:16.203 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 1” id:1
2013-10-13 10:45:16.205 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:1 to:1
2013-10-13 10:45:16.206 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 2” id:2
2013-10-13 10:45:16.208 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:2 to:2
2013-10-13 10:45:16.209 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 3” id:3
2013-10-13 10:45:16.211 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:3 to:3
2013-10-13 10:45:16.212 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 4” id:4
2013-10-13 10:45:16.213 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:4 to:4
2013-10-13 10:45:16.215 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 5” id:5
2013-10-13 10:45:16.216 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:5 to:5
2013-10-13 10:45:16.217 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 6” id:6
2013-10-13 10:45:16.219 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:6 to:6
2013-10-13 10:45:16.220 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 7” id:7
2013-10-13 10:45:16.221 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:7 to:7
2013-10-13 10:45:16.223 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 8” id:8
2013-10-13 10:45:16.224 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:8 to:8
2013-10-13 10:45:16.225 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 9” id:9
2013-10-13 10:45:16.227 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:9 to:9
2013-10-13 10:45:16.228 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:45:16.229 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Consumer Control” id:0
2013-10-13 10:45:16.231 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:0 to:0
2013-10-13 10:45:16.232 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Numeric Key Pad” id:1
2013-10-13 10:45:16.234 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:1 to:1
2013-10-13 10:45:16.235 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 2” id:2
2013-10-13 10:45:16.236 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:2 to:2
2013-10-13 10:45:16.238 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 3” id:3
2013-10-13 10:45:16.239 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:3 to:3
2013-10-13 10:45:16.240 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 4” id:4
2013-10-13 10:45:16.242 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:4 to:4
2013-10-13 10:45:16.243 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 5” id:5
2013-10-13 10:45:16.244 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:5 to:5
2013-10-13 10:45:16.246 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 6” id:6
2013-10-13 10:45:16.247 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:6 to:6
2013-10-13 10:45:16.248 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 7” id:7
2013-10-13 10:45:16.250 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:7 to:7
2013-10-13 10:45:16.251 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 8” id:8
2013-10-13 10:45:16.253 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:8 to:8
2013-10-13 10:45:16.254 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 9” id:9
2013-10-13 10:45:16.255 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:9 to:9
2013-10-13 10:45:16.257 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 10” id:10
2013-10-13 10:45:16.258 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:10 to:10
2013-10-13 10:45:16.259 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 11” id:11
2013-10-13 10:45:16.261 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:11 to:11
2013-10-13 10:45:16.262 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 12” id:12
2013-10-13 10:45:16.263 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:12 to:12
2013-10-13 10:45:16.265 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 13” id:13
2013-10-13 10:45:16.266 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:13 to:13
2013-10-13 10:45:16.267 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 14” id:14
2013-10-13 10:45:16.268 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:14 to:14
2013-10-13 10:45:16.270 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 15” id:15
2013-10-13 10:45:16.271 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:15 to:15
2013-10-13 10:45:16.272 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 16” id:16
2013-10-13 10:45:16.273 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:16 to:16
2013-10-13 10:45:16.275 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 17” id:17
2013-10-13 10:45:16.276 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:17 to:17
2013-10-13 10:45:16.277 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 18” id:18
2013-10-13 10:45:16.278 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:18 to:18
2013-10-13 10:45:16.280 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 19” id:19
2013-10-13 10:45:16.281 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:19 to:19
2013-10-13 10:45:16.282 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 20” id:20
2013-10-13 10:45:16.283 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:20 to:20
2013-10-13 10:45:16.284 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 21” id:21
2013-10-13 10:45:16.293 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:21 to:21
2013-10-13 10:45:16.295 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 22” id:23
2013-10-13 10:45:16.296 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:23 to:23
2013-10-13 10:45:16.301 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 23” id:24
2013-10-13 10:45:16.302 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:24 to:24
2013-10-13 10:45:16.303 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 24” id:25
2013-10-13 10:45:16.305 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:25 to:25
2013-10-13 10:45:16.306 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 25” id:26
2013-10-13 10:45:16.307 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:26 to:26
2013-10-13 10:45:16.308 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 26” id:27
2013-10-13 10:45:16.309 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:27 to:27
2013-10-13 10:45:16.310 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 27” id:28
2013-10-13 10:45:16.311 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:28 to:28
2013-10-13 10:45:16.311 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 28” id:29
2013-10-13 10:45:16.313 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:29 to:29
2013-10-13 10:45:16.314 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 29” id:30
2013-10-13 10:45:16.315 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:30 to:30
2013-10-13 10:45:16.316 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Adding button: “Button 30” id:31
2013-10-13 10:45:16.335 FINE com.jme3.input.lwjgl.JInputJoyInput$JInputJoystick addButton Remapped:31 to:31
2013-10-13 10:45:16.337 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
2013-10-13 10:45:16.338 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:45:16.339 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
2013-10-13 10:45:16.340 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Attempting to create joystick for: “USB Receiver”
2013-10-13 10:45:16.341 FINE com.jme3.input.lwjgl.JInputJoyInput loadJoysticks Not a joystick: USB Receiver
[/java]

Thank you very much for taking care of this.

I’m not sure if these logs can help you. I don’t see anything new.

For the Speedlink joystick:
I tried to understand the code in the InputManager. Its raw listener maps the events using hash values. It’s hard to see for my why this works and the TestJoystick example not. The code is too different.

Maybe I should use the same hash technique in my raw listener, so that the result is always the same. The joystick works or not.

This:

Is just plain stupid. Some joystick manufacturer deserves to have some short hairs yanked right out of somewhere sensitive. There isn’t a whole lot we can do about this short of letting the remapping use the integer IDs… but then USB Gamepad is too generic to include that as a mapping internally. These crappier joysticks may only be supportable when there is a way for a user to manually configure them for the game.

A RawInputListener is just getting the raw events. It gets every event for every motion, unfiltered. So I don’t know what “not working” means in this case. Whatever is not working is then specific to the listener itself, I think. In fact, the raw input listener is the one place you should be getting events for all of the axes despite their stupidly named arrangement.

I will read the XBox post now.

What’s weird about the XBox controller is that we already have a mapping for this one in the default mapping properties:
[java]

Xbox 360 Controller (Wireless)

Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).0=2
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).1=1
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).2=3
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).3=0

Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).6=8
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).7=9

Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).8=10
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).9=11

Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).rx=z
Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).ry=rz
[/java]

Note the last two lines which should make the right stick work properly.

I’m not sure why these aren’t being loaded in your case. Maybe you can take a look at turning up FINE logging on com.jme3.input.JoystickCompatibilityMappings to see what it’s really loading. It’s supposed to load every joystick-mapping.properties on the classpath.

For Speedlink:

A RawInputListener is just getting the raw events. It gets every event for every motion, unfiltered. So I don’t know what “not working” means in this case.

The example uses
[java]
axis == axis.getJoystick().getXAxis() // i.e. 1 == 4
[/java]
which is never true, so I have to use
[java]
axis == axis.getJoystick().getAxis(JoystickAxis.X_AXIS) // i.e. 1 == 1
[/java]

Obviously the implementations of both methods differ. Although you could guess they are equal or it is just a shortcut. But they aren’t equal.
Of course the Speedlink is a very cheap joystick (10$), not worth the effort. I used it to test compatibility in general.

For XBOX:
The wired controller version has a different name string. That’s all. Therefore - as I wrote earlier - I copied the entries with the key “XBOX 360 For Windows”, but you wanted a test with an unmodified version of TestJoystick. :wink:

And the trigger buttons are not supported as you wrote as checkin comment :

Added joystick mappings for wireless Xbox 360 controller. Back shoulder buttons are not supported because its not possible to convert axis into button at the moment.

But I thought it was a good idea to disable them completely, because it is surprising that the triggers will move the right stick:
[java]
Controller\ (XBOX\ 360\ For\ Windows).z=trigger
[/java]

And if you need to support them you can catch them in the raw listener.

Thanks for your help!

BTW here are my additional joystick-mapping.properties entries:
[java]

Xbox 360 Controller (Wireless)

requires custom code to support trigger buttons

Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).z=trigger

Xbox 360 Controller (copied from wireless version)

Controller\ (XBOX\ 360\ For\ Windows).0=2
Controller\ (XBOX\ 360\ For\ Windows).1=1
Controller\ (XBOX\ 360\ For\ Windows).2=3
Controller\ (XBOX\ 360\ For\ Windows).3=0

Controller\ (XBOX\ 360\ For\ Windows).6=8
Controller\ (XBOX\ 360\ For\ Windows).7=9

Controller\ (XBOX\ 360\ For\ Windows).8=10
Controller\ (XBOX\ 360\ For\ Windows).9=11

Controller\ (XBOX\ 360\ For\ Windows).rx=z
Controller\ (XBOX\ 360\ For\ Windows).ry=rz

requires custom code to support trigger buttons

Controller\ (XBOX\ 360\ For\ Windows).z=trigger

Speedlink Hornet SL-6512-SWT

USB\ Gamepad.0=2
USB\ Gamepad.2=4
USB\ Gamepad.4=0
[/java]

NOTE: The Speedlink gamepad has a trailing space in its name, but it is removed by the properties lookup.

I don’t think we should add this one: “USB\ Gamepad”

I have two different gamepads that use this name and require no remapping at all. Some joystick mappings will just have to be supported elsewhere… either in an OS utility or if the game lets the player map things at runtime (like many games).

Regarding this stuff:
axis == axis.getJoystick().getXAxis() // i.e. 1 == 4
which is never true, so I have to use
axis == axis.getJoystick().getAxis(JoystickAxis.X_AXIS) // i.e. 1 == 1
1

I think there is a comment in the TestJoyStick app that explains kind of why this is.

If you really want to map to a specific axis then you should use the axis ID. For joysticks where the logical IDs are complete nonsense (as in this cheap example), it would be the only way to map them. So you could have the user define the mappings by maybe clicking a button on the screen and then moving the joystick to capture the right axis. That’s the first “axis” that is passed into the event… then you can use that to map to your listener. (Or use a third party tool to make it behave properly.)

P.S.: I will try to apply the other xbox mappings to the defaults soon. It will at least be in any 3.1 release then.

1 Like

Of course “USB Gamepad” is a little bit too common.

And thanks for adding the wired XBOX controller.

If anyone would like to support the trigger buttons in TestJoystick:
[java]
public void setAxisValue( JoystickAxis axis, float value ) {

            ...
            // Requires entry in joystick-mapping.properties: Controller\ (XBOX\ 360\ For\ Windows).z=trigger

            else if (axis == axis.getJoystick().getAxis("trigger")) {
            // NOTE: Currently it is not possible to press LT+RT at the same time
            if( lastTrigger > 0.5 ) {
                setButtonValue( JoystickButton.BUTTON_6, false );    
            } else if ( lastTrigger < -0.5 ) {
                setButtonValue( JoystickButton.BUTTON_7, false );
            }
            if( value > 0.5 ) {
                setButtonValue( JoystickButton.BUTTON_6, true );    
            } else if (value < -0.5) {
                setButtonValue( JoystickButton.BUTTON_7, true );
            }
            lastTrigger = value;
        }

[/java]

@pspeed: I cant believe you own 6 or 7 joysticks but no XBOX controller. It certainly is the best product Microsoft ever brought out :wink: As a game (engine) developer you really should have one! Sure there are many others of equal quality but its capability of being console and PC controller the same time made it really famous. Since I bought mine I have never seen an input mapping screen again. It just works with every game no matter if indie or EA. I’m sure the controller manufacturers will slowly move towards the XBOX layout as a standard (on PC) IF AND ONLY IF Microsoft doesn’t ruin everything with the XBOX One controller.

Sorry for the offtopic but I really wanted to say a good word for the XBOX controller :wink: Happy to hear it gonna be improving in that direction.

@jejay said: @pspeed: I cant believe you own 6 or 7 joysticks but no XBOX controller. It certainly is the best product Microsoft ever brought out :wink: As a game (engine) developer you really should have one! Sure there are many others of equal quality but its capability of being console and PC controller the same time made it really famous. Since I bought mine I have never seen an input mapping screen again. It just works with every game no matter if indie or EA. I'm sure the controller manufacturers will slowly move towards the XBOX layout as a standard (on PC) IF AND ONLY IF Microsoft doesn't ruin everything with the XBOX One controller.

Sorry for the offtopic but I really wanted to say a good word for the XBOX controller :wink: Happy to hear it gonna be improving in that direction.

I bought somewhere around 6 cheap joysticks just to test them with JME. Some of them are XBox shaped. I prefer PS3 style controllers as the XBox ones feel like giant hockey pucks in my hand. Everyone’s tastes are different, I suppose… but I’ve been a Playstation gamer for a long time.

Currently, my favorite is this one: http://www.amazon.com/Snakebyte-Final-Fantasy-XIV-Controller-000009/dp/B0046ZQ022/ref=sr_1_1?ie=UTF8&qid=1382025080&sr=8-1

…though when I bought it, it was only $18.99. I grabbed it just as one of the test joysticks but I like it even better than my PS3 gamepad at this point. Now I see I apparently got a good deal.

For reference, here was the post where I posted the joysticks I bought for testing (plus one really old flight stick I already had from 2002 or so):
http://hub.jmonkeyengine.org/forum/topic/gamepads-with-jme/page/2/#post-189729

Had this picture:

I bought these just for testing a variety of gamepads… so I went cheap. Nothing more than $20 and most less than $15.

@pspeed said: Currently, my favorite is this one: http://www.amazon.com/Snakebyte-Final-Fantasy-XIV-Controller-000009/dp/B0046ZQ022/ref=sr_1_1?ie=UTF8&qid=1382025080&sr=8-1

Now I understand where the entry in joystick-mapping.properties comes from :wink:

@revv said: Now I understand where the entry in joystick-mapping.properties comes from :wink:

Yeah, it didn’t require many remappings… just two of the buttons, I think.

I will do the same for any other joystick that properly labels itself and requires remapping.

FYI: I finally got around to applying this patch. Sorry it took me so long:

http://code.google.com/p/jmonkeyengine/source/detail?r=10847

It’s on trunk so will be in any 3.1 releases, trunk nightlies, etc… I don’t know if it’s worth back-porting to the 3.0.x branch at this point.