123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|429|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Off Topic -> Jay's Button Test

Thu, 10 Oct 2013, 13:53
spinal
Jay - missing top L,R shoulder buttons and analog stick buttons. everything else works fine (OUYA Controller)

-=-=-
Check out my excellent homepage!
Thu, 10 Oct 2013, 13:53
Jayenkai
Thanks. I'll be doing OUYA specific stuff, tomorrow, but good to know that it at least vaguely works!

button test for Windows and Android devices.

-=-=-
''Load, Next List!''
Thu, 10 Oct 2013, 17:38
CodersRule
I tested it on Windows with the 360 controller, but you seem to already know how well that works.

I also used it on my Nexus 10 with the Moga Pro in HID mode (which is mode B; mode A only works with apps written for the Moga). In case you're unaware, the Moga Pro is laid out about the same way as the 360 controller. The analog sticks work out the same as the 360 controller's sticks do; both work fine, but the left one (and only the left one) also lights up the red dots when the stick is moved over them. The sticks also seem to have a much more consistent 'resting position' (which is always well-centred over the centre dot) relative to the 360 controller whose sticks can move around a bit even when they're resting.

The D-Pad doesn't work at all. The ABXY buttons work exactly as expected, which was a bit of a relief; from my tests in other applications, it seemed almost like HID mode on the Moga was sending incorrect signals to the device. In some games and the main Android operating system, A and B both act as a 'back' button and X acts like a 'select' button. I'm not sure why, but your app seems to pick up the button locations just fine. If you do intend to use multiple buttons, though, it's always very appreciated to throw in an option for custom button mapping so that things like these aren't a problem (some games are pretty much unplayable with the borked controls). The clickable sticks do not do anything, but that might be a limit of HID mode in the Moga (very unsure about this though, because I don't recall noticing this when testing on Windows). Both the left and right bumpers work fine, but the triggers do not work. The trigger thing is definitely a limitation of the HID mode; I'm sure that I've never gotten them to work on any other device.

The start button on the right pops up the menu, and the select button (which corresponds to a 360 controller's back button) is like the Android hardware back button; it exits out of the game, presumably without sending the 'back' signal. I'm not sure if it's possible to catch this signal and prevent the Activity from being hidden, but it's kind of annoying to accidentally bump the select button.

edit: I've tested the stick clicking as well as the D-pad in HID mode, and they work elsewhere in the operating system. The D-pad performs the expected operations (go left, right, up, down in the UI), and the left and right sticks both select what you're currently hovering over.
Fri, 11 Oct 2013, 03:46
Jayenkai
Thanks for the extremely thorough test!

Yeah, seems to be working identically to the x360 pad, even down to that annoying trigger-quirk. Not sure what to do about that, but to be honest, I doubt any of my games will ever bloody well need it, so I'm willing to just pretty much ignore it!
99% of my games need nothing more than Dpad and fire button, so analogue triggers aren't exactly a high priority right now!!

The Dpad thing is annoying, though.
I've scanned through monkey's output, and as far as i can tell, I'm using it correctly, so the Dpad should be working..
Grrr.

The left stick currently doubles Dpad inputs so that I can lazily continue to pretend it is one, and not need to recode half-a-dozen bits and pieces.. The menus and all that, rely on Dpad control, so if the left stick didn't replicate those inputs, you'd be buggered.
I'll probably spend most of today trying to get that half of things sorted, alongside neatening up the code a little, and then battling with the OUYA, too.

Busy day!!


-=-=-
''Load, Next List!''
Fri, 11 Oct 2013, 04:09
CodersRule
The 360 controller does function differently on Windows for me. The main differences seem to be that clicking the stick works fine, and the triggers also work (± on the Z-axis, which shows up only on the left side of the UI).
View on YouTube
Fri, 11 Oct 2013, 04:24
Jayenkai
Differently, but not MASSIVELY differently!!
Or rather, different, but within respectable parameters.

Like I said, I'll probably ignore the trigger issues since I'll probably never use them, but the main bit is that the two thumbsticks and the main buttons bloomin' well work!!!
Left thumbstick in particular, is a bitch!
In GLFW, Left Thumbstick's Y axis is inexplicably flipped, so -1 is down and +1 is Up.. In all other targets, left stick Y is -1 for up.. I don't know why this is, and was simply hoping folk could test that it wasn't just my X360 pad that was breaking that logic!!

Thankfully, all seems reasonably workable.
Now, if I can get the dpad to work, too, I'll be super-happy!!


-=-=-
''Load, Next List!''
Fri, 11 Oct 2013, 04:32
CodersRule
I tried using the Moga on Windows in HID mode, where the D-pad and stick-clicking work just fine. The controller works according to the Gamepad settings on my computer, but your application doesn't pick it up at all. That could be a driver issue on my part, but it's a standard HID-over-bluetooth game controller. Maybe you can try to figure out how to make that work, which would help with testing other controllers.
Fri, 11 Oct 2013, 04:35
Jayenkai
Yeah, but I'm trying not to touch ANY settings in Windows, or play about with any drivers, or things like that..

The controller is obviously working fine, so my game should fit the controller, not the other way around, I just need to figure out what bit of Monkey is picking up the signals wrong, and tweak it about until it's working right.

-=-=-
''Load, Next List!''
Fri, 11 Oct 2013, 07:35
9572AD
Isn't a MOGA in HID actually a keyboard?
Fri, 11 Oct 2013, 14:59
CodersRule
Nope. The MOGA in HID mode shows up in Windows (after getting the default Windows driver set up) as a game controller, not as a keyboard. Some Android/iOS controllers do work as keyboards, but even in Mode A the MOGA is not a keyboard (I think Mode A is a protocol specific to the MOGA that rides right on top of the bluetooth spec). The HID specification (and, by extension, the HID-over-bluetooth specification) fully supports game controllers (and, in fact, my Playstation 3 controller seems to show up as an HID controller when I have the MotionInJoy ds3tool driver enabled).