Re: [AD] Ouya controller support

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


When you’re doing this you should make sure that the same binary will run on Ouya and Android phones/tablets as well. So when receiving keys, it should send key events if the device isn’t an Ouya joystick. And for ALLEGRO_JOYSTICK devices it should use the accelerometer or Ouya joysicks depending on device at runtime.
 
Trent
 
Sent: Thursday, July 11, 2013 3:15 PM
Subject: Re: [AD] Ouya controller support
 
The gamepad sends key and motion events. Which controller the event came from is determined with OuyaController.getPlayerNumByDeviceId(event.getDeviceId()).
 
I have been experimenting with a joystick driver that is based on the key and motion event and it works fine. The idea with my current implementation is to emulate the button and stick layout as they appear when paired to a computer and running the ex_joystick_event example so that the game can be tested on a computer.
 
The feture is currently enabled by passing WANT_OUYA to CMake but it should be easy to detect at runtime if the OuyaController class is available and then replace the accelerometer.
 
I am planning to try enabling the Linux joystick driver too. Maybe it just works since Android is Linux.
 
The current code can be found here: https://github.com/lilliemarck/allegro in branch 5.1-ouya_controller. It still only emulates a single controller.
 


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


--
https://lists.sourceforge.net/lists/listinfo/alleg-developers


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/