Controller bugs and oddities

Monkey Forums/Monkey Programming/Controller bugs and oddities

ElectricBoogaloo(Posted 2013) [#1]
I originally had my controller stuff working "enough" then largely ignored it afterwards, so I've only just noticed a whole bunch of oddities in recent weeks.
Note, I've only (so far) tested with an x360 pad, on both a Win7 laptop, and a Nexus7, so apologies if these are inaccurate using other devices/OSs with different controllers!!

First, when compiling in GLFW, joyY(0,0) is positive for up, whereas. JoyY(1,0) is negative for up.
To add further confusion. Under Android, both 0,0 and 1,0 are negative for up.
Not entirely sure why this is, but seemed odd!

Secondly, the Dpad just doesn't seem to register anymore. Pretty sure it did at an earlier stage, but something's changed during the interim.

Third, on the Windows version, clicking the thumbsticks seems to register as "Dpad up/left", so something's definitely screwy in the code, somewhere.. Unless it's Windows doing that..?!


I've compiled a windows exe and android apk here, so if anyone would like to test it on their devices, feel free..

Thanks for any/all comments/tests..


ImmutableOctet(SKNG)(Posted 2013) [#2]
I've had the same issue with the xbox 360 controller on Windows 7 and 8 (No idea about any other platforms / operating systems), but I don't remember the D-pad ever working properly in GLFW, only XNA. I also remember the Y axis of the main/left joystick being inverted on XNA compared to GLFW. GLFW's trigger / Z axis handling is also very screwy; it treats both triggers as one axis (Unlike XNA's separated approach), and it tends to go all over the place (It likes to sit at something odd like -1.5 when you aren't doing anything). Unlike XNA, GLFW also has literally no dead-zone setup, so that can be a bit ridiculous at times. I don't know why Mark doesn't just tweak his wrapper to make things consistent, it's not like we haven't brought this up before.

I usually write my own input handling code anyway, so I can tweak around these problems. At the end of the day, controllers are still buggy, which kind of sucks. If you really want to see how annoying all of the inconsistency can be, look at the "bananas/mak/joytest" demo.

EDIT: I forgot to ask, and I'm sure it has been asked before, but does the Android target actually support gamepads at the moment? I know the OUYA target does, but I've never had any clarification for normal Android. I'm asking because the two tablets I'm able to test on don't have bluetooth support.


ElectricBoogaloo(Posted 2013) [#3]
Yeah, I was watching a Tested.com video of the New Nexus 7 model, the other week, and they briefly mentioned (in passing) how you could plug an X360 controller into it...
Seriously?! It hadn't ever occurred to me to try that!!
So I got a MicroUSB to USB converter, and updated to the newest monkey, and.. Sure enough, Mark's got it all up to speed!

I can get pretty much identical inputs from the X360 pads, on my Android. Two sticks, face buttons are fine. Triggers are quirky, dpad's none-existent.
But.. Yeah, works great, so coupled with the OUYA, I'm going to be digging into a few new bits and pieces, it seems!!


Oddball(Posted 2013) [#4]
I've found that the axis index/directions and button mappings for the xbox360 controller are different on all the targets/hosts. I've mentioned it a couple of times. In the end I created a wrapper class that re-maps everything to be uniform across all the targets I use.