iOS 7 Game Controllers support

RodrigoCard wrote:

Ryan C. Gordon wrote:

In the SDL API, the triggers should be axes, to more cleanly map into
the SDL game controller API.

Agreed, and further more: can someone with one of these controllers
write a quick test app and see if any of the non-trigger buttons report
anything other than 0.0 and 1.0? I’d be surprised if they do (hence my
thought that Apple simply didn’t want to call the triggers “axes” even
though they really are).

Thanks,
–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Everything (really! even the Dpad, so they should be mapped to axes not a hat, right?) in these controllers are pressure sensitive.
Look:

Code:
#pragma pack(push, 1)
typedef struct {
// Standard information
uint16_t version; //0x0100
uint16_t size; //sizeof(GCExtendedGamepadSnapShotDataV100) or larger

// Extended gamepad data
// Axes in the range [-1.0, 1.0]
float_t dpadX;
float_t dpadY;

// Buttons in the range [0.0, 1.0]
float_t buttonA;
float_t buttonB;
float_t buttonX;
float_t buttonY;
float_t leftShoulder;
float_t rightShoulder;

// Axes in the range [-1.0, 1.0]
float_t leftThumbstickX;
float_t leftThumbstickY;
float_t rightThumbstickX;
float_t rightThumbstickY;

// Buttons in the range [0.0, 1.0]
float_t leftTrigger;
float_t rightTrigger;

} GCExtendedGamepadSnapShotDataV100;
#pragma pack(pop)

this is in the GCExtendedGamepadSnapshot.h (the non extended are all floats too)

And yes, I tested it myself with a MOGA Ace power, it really have pressure in all the buttons (!)

Also, you can read a property “isPressed” for all buttons (and Dpad) which returns true if there is something more than 15% or 25% of pressure, the buttons feel a bit mushy because of that (you can read the pressure values under 15% too, but it may be noisy).> > On 4/23/14, 4:48 PM, Sam Lantinga wrote:


Rodrigo Cardoso Rocha
@RodrigoRodrigoR - twitter.com/RodrigoRodrigoR
Chibata Creations - chibatacreations.com

According to a 9to5mac article back in January, all MFi controllers
on the market today use the same pressure-sensitive buttons from a
single supplier (I think it was Fujikura?) Controller developers had
NO lead time and basically did as much as possible following the
pre-approved formula. Which basically means they copied Apple’s
prototypes as best they could to get a product on the shelf with as
little engineering time as they could.

So yes, the controls are actually analog on every MFi controller out
there today.

Unfortunately, because the current crop of controllers are all copies
of the prototypes with rushed engineering and testing, they all cost
too much and none feel like a quality first-party controller for iOS.
That’d take much longer to develop, test, and approve. Especially if
you needed to get the cost down at the same time.

I’ve got little desire for one of these first sloppy-feeling models
especially for the price. When newer models appear with more solid
feel and aimed more at the iPad, AppleTV, and the Mac? I’ll pick one
up. I’m still not happy about the not-really-a-button pause, and the
analog DPad just cannot be a good idea, but any game plays well on
the controls it was designed for.

And Sony did an excellent job with the PS2 analog buttons, which were
mostly used as digital by games, so it can be done well?

JosephOn Thu, Apr 24, 2014 at 09:28:35PM -0400, Ryan C. Gordon wrote:

On 4/23/14, 4:48 PM, Sam Lantinga wrote:

In the SDL API, the triggers should be axes, to more cleanly map into
the SDL game controller API.

Agreed, and further more: can someone with one of these controllers
write a quick test app and see if any of the non-trigger buttons
report anything other than 0.0 and 1.0? I’d be surprised if they do
(hence my thought that Apple simply didn’t want to call the triggers
"axes" even though they really are).

Thanks,
–ryan.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org