- Home /
Android multiple gamepad/controller/joystick support?
Does anyone know the best way to account for different gamepad support (beyond button mapping). Or would button mapping be the best way to deal with this scenario?
I wouldn't mind having 1 build that can work with connecting a random gamepad (like Green Throttle's) or maybe even on a microconsole (like Ouya. But I understand that probably won't happen without specific button mapping)...
well id use either the input manager or every time i check inputs i use a million ors,
ex.
if(this.input || this.input || this.input)
Answer by tlalexander · Dec 05, 2013 at 08:05 AM
I looked into this myself recently (well, for gamepad libraries at all on android), and there's sadly no simple comprehensive library I could find.
The best thing I found was the open source Mupen64+AE Nintendo 64 emulator, which has excellent controller support. I hacked their code apart to use a gamepad for a robot, but I would really love to see someone break it out into a clean Android gamepad library. They patch together an existing library with their own work to support most good options for gamepads. I was told they have a great forum if I had any gamepad development questions, so you may want to check that out.
Oh, and the emulator has a free version with a nice joystick test mode in the settings, so you should be able to quickly see whether or not your desired joystick works.
I guess I'll just use an input manager and hardcode the inputs of the different buttons and joysticks...