Automatic Gamepad Mappings for Desktop


  • *
  • Posts: 9461
Gamepad support has been in Stencyl for a long time, but one important feature missing that almost all modern games use is automatic gamepad detection.  At first I looked into OpenFL's gamepad API, but it was lacking in device support.  Then I found this preset list that could be used to apply gamepad mappings to a lot of different gamepads.  Check out the attached sample game to see how it works and check if your own gamepads are automatically detected.  Matching is done based on the gamepad ID first, then the gamepad name, then a partial name (such as "PS4").  If a match is found then pressing the gamepad buttons should trigger the expected results on the screen.

The sample game works for public and private Stencyl builds as well as PC, Mac, and Linux (each platform has separate mappings).

« Last Edit: October 12, 2019, 01:26:19 pm by rob1221 »