Adobe GameInput API is a
terrible f*cking sh*t.
First I used
StackAndHeap's joystick ANE which is OK but I had to rebuild the dll in release mode to avoid debug dependencies and fix some crashing errors on the AS3 side. It was fine until I needed a fourth axis which wasn't supported.
So I decided to make one from scratch and document the process. 2bam's
NativeJoystick ANE now supports any device that Windows detects, with up to 6 axes and 32 buttons. Even with same product/manufacturer ID & USB-serial number as most cheap controllers have. It's not just that I'm a cheap bastard,
which I am, but also I believe in inclusion of people which can't afford an Xbox controller and also useful for installations in which controllers tend to break often and become a deal of an investment.
Features- Static runtime libs for DLL, release-mode, no dependencies besides system and small size.
- Not "new"ing anything for each poll, nor dispatching events unless you actually add event listeners.
- 16 controllers, 6 axes/32 buttons when available
- Find OEM joystick name in registry.
- Open source, MPL2.0 licensed
Open sourceThe library and source can be found on github (
links here).
The license is mostly MPL2.0 (except some code from Adobe and FreeGlut) and the graphics are CC-0 (Public domain dedication)
TutorialI've collected the experience in screenshots and text for a "
Windows ANE from scratch" tutorial.
Still needs some polishing, so it will be released in a couple of weeks.