Better Ouya gamecontroller support....

Monkey Targets Forums/Ouya/Better Ouya gamecontroller support....

Bostrup(Posted 2014) [#1]
for glbasic, im have created a Java based library for supporting various game controllers. By now its seen its only support player one and only one controller supported.

Im can expand that by fully supporting various game controllers with full 4 player supporst for both Ouya and GameStick. Also its supports xbox, ps3 and Madcatz controllers as well for supported Game Controllers. This can im do without breaking compatible with the included commands by extending androidgame.Java and by adding GameController.Java.

But there is one thing on Android/Ouya you need to known:
To supports all gamecontrollers, you needs create a remapping meassure for your game. If you dont do that, many unknown game controllers wont works out of the box.

To do that, im do require three new commands to get remapping working:
JoyName:String(port:Int)
JoyGameLayout(Layout:String)
JoyRemapping:String()

What is the best way without fork Monkey for adding those 3 commands? Remapping thing is only really required on normal Android devices with gamecontroller support. On Ouya this is really not required at all.


AdamRedwoods(Posted 2014) [#2]
there is/was an Ouya community module we were maintaining that allowed for 4 controllers. not sure if it covered adapting to 3rd party controllers.
feel free to fork it and add to it if it helps.
https://github.com/JochenHeizmann/monkey-ouya


Bostrup(Posted 2014) [#3]
have not seen the code (but will do soon), but property not. On Android there is no standard how the gamecontrollers is mapped. Im have allready created the library, just need to replementet it again in monkey style. im do might do own module to cover anything.


Bostrup(Posted 2014) [#4]
just seen the code. Its only supports the ouya controllers, due hard code values. But its a nice code. Im do perfer doing my own, due im allready did such support for the other language. Im do not dispatch any keys.


maverick69(Posted 2014) [#5]
Hey, my monkey-ouya repo was created back when Monkey hadn't support for OUYA target at all.

I would recommend to fork the Monkey-Repo, do a clean solution and send Mark a pull request. This way all monkey user would benefit :-)


computercoder(Posted 2015) [#6]
MonkeyX is already capable of providing support for four controllers. You simply need to index which controller you want between 0 and 3. Take a look at the example under bananas\mak\joytest\joytest.monkey, then compile it using the OUYA target that comes with Monkey X. This has been in place since MonkeyX Pro 75d.