Recent changes to the GameInput API on Adobe AIR

The GameInput APIs are a somewhat new thing to Adobe AIR, and as such, I suppose it’s still undergoing some intensive testing and polishing. Following a tip from James D. Palmer (who encountered different results than me on some controls), I decided to do a new round of testing of the GameInput controls one gets from common devices and found that indeed some controls have changed recently, from AIR 3.8 beta to the release version, to 3.9 beta 790 (the one I used).

After a round of tests on Windows, Android, OUYA (this one with the OUYA gamepad, an XBox 360 gamepad, and the PS3 gamepad), my spreadsheet of known GameInput controls for Android/Windows/OUYA has been updated to reflected those changes. In a nutshell, they are as such:

  • The START button on most controllers (XBox, PS3) now fire a proper GameInput control (BUTTON_108) on Android and OUYA
  • The digital directional pad controls (BUTTON_19, BUTTON_20, BUTTON_21, BUTTON_22) simply stopped working when using an XBox 360 gamepad on the OUYA. They are removed from the list of reported controls. Use the analog equivalents (even though they don’t report granular values), or the injected keyboard events. As bad as this change is, OUYA controls are now more similar to the listed Android controls, so consistency is a good thing.
  • The keyboard events injected when using the action buttons on Android changed radically and can be somewhat annoying to work with (e.g., ENTER is dispatched when any of about half the buttons is pressed).

Also note that spreadsheet list now includes a list controls under OS X (thanks again to James). It turns out Adobe AIR (or, more likely, OS X) uses very different control ids on Macs, so keep in mind you’ll need one additional condition when setting up your controls if you plan on supporting that platform. Or, better yet, customizable controls; I plan on writing something about this soon.