OUYA sample app

green.castle,

The next Corona release will include Ouya and input device support.  We haven’t set a release date yet because we’re taking the time to tweak and tune and make this thing “right” for the upcoming release.  We’re not shy about announcing new releases of Corona.  So, I’m sure you’ll here something.  :)

CineTek,

I’m glad you’re liking it so far.  And if you have any feedback for us, then please feel free to let us know.

So far, I’m still thinking I need to make some tweaks on how to handle connected/disconnected game controllers.  Currently, if you connect a gamepad to an Android device, it will be assigned an InputDevice.descriptor of “Joystick 1”.  If you disconnect that gamepad and then re-connect it (which can happen when the batteries die), our newest daily build now allows it to come back as “Joystick 1”.  This I’m fine with.  However, in the case where the first gamepad is disconnected (or its batteries fail) and the player connects a different gamepad, then Corona will register it as “Joystick 2”.  I’m currently debating if this is the correct behavior or not.  Corona does recognize a totally different gamepad has been connected to the system.  Should Corona assume its a new player joining the game or is it player 1 just swapping controllers?  This is one of those things we want to make sure to get right by the upcoming release.

I’m also thinking that the key event name “unknown” was a bad idea and we should always provide a unique key name such as the hex value of the key code that we don’t recognize.  The reason I’m thinking this is because I’d like to provide mouse button up/down events via Corona’s key events, but mouse buttons do not have key code on Android… but they do on Windows, but Windows does not have key codes for gamepad/joystick buttons.  None of this pertinent to Ouya, but this is just us trying to make this thing as cross-platform as possible before release.

This sounds very interesting and it seems like Corona is moving in the right direction :slight_smile:

But unfortunately I was not able to test the latest features because I can not build for Android anymore :confused: I´ve re-installed some of the older Corona Builds because I thought that this might be a bug of daily build 1170, but it does not work so far.

The sample apps do not work either :confused:

Max

I see in the log that your app is using a “custom build ID”.  This tells Corona to build your app with a particular daily build version instead of the version that you are running.
 
Do you have the following setting in your “build.settings” file?

settings = { build = { custom = "1234567890" } } 

 
If so, then remove it and rebuild your app.  That will tell Corona to build the app using the daily build version that you are currently running with.

No, I do not have this line in my build.settings file. The other apps (sample apps) do not have these lines either.

I take it back.  The custom build ID message is normal for daily build versions.  They’re just not used in release versions.

Does this build error only happen with this one app?  Does it happen with any of our sample apps?

Also, it may have just been a server blip at the time, which should be rare.  I just did a build with 1170 now and it worked fine.

Well, it happens with all apps. But it seems to be a problem with my PC… It worked fine a few months ago, and today I reinstalled java by using an installer called “jdk-7u25-windows-i586.exe” (it comes directly from the oracle website)

Hm… I have installed Java 64 bit as well, I will delete it and see if that helps.

Edit: And android builds work fine on my Macbook…

Sadly no, this did not resolve my problem on Windows :frowning:

@BackToTheTopic: After building the .apk via macbook and uploading it to my webserver I can not get it to run … “parsing error” … I made sure that I am able to install unsigned/unknown software on my Ouya but it still does not work…

May someone please upload this .apk file? I would like to test if I can not install software at all (official apps from Ouya work fine though)

Update: I managed to get it working… Side-note to myself: Never ever rename a compiled apk file -.-…

@Josh Will Pro users have to also wait for the next public build? Will these be in the daily builds beforehand?

Also any updates when the plugin is coming? Can some of us Pro users be beta testers for it? 

I have an app working using basic controller support etc, but if I understand correctly I can’t upload it to Ouya store as some of the settings are not right with the xml file made by corona? 

Also can you put a 1280x720 screen in the simulator so we can test more in the sim before building for device.

thanks

We’re not writing the Ouya plugin.  The plugin is being developed by Ouya (the company) themselves.  When it is ready for testing, we’ll make it available via our daily build system to Pro users.  When, I don’t know.  As I’ve said, we’re not writing it.  But they’re working hard on it and we’re doing our part to support them and working on gamepad support in parallel.

Ouya (the company) plans to open source the plugin code.  Their initial plan is to make it available to Corona Enterprise users via the link below.  It won’t help you, but it demonstrates the progress that they’ve made and their commitment to making this plugin.

   https://devs.ouya.tv/developers/docs/corona

Regarding your other questions, have a look here…

   http://forums.coronalabs.com/topic/36267-has-anyone-managed-to-edit-the-androidmanifestxml-and-build-a-valid-apk-again/?p=189496

Everyone,

Today’s daily build now supports analog joystick and trigger input via the “axis” event.  Documentation can be found here…

   http://docs.coronalabs.com/daily/api/event/axis/index.html

Awesome, any ETA for the official plugin from Ouya? I checked their site but didn’t see much about a plugin for Pro users…

Odd… if i try the code in this article, build it, and run the APK on my Ouya with Ouya controller, i get “left, right, up, down” from the D-pad and the left stick, i get “POWER” from the central button, i get “back” from the A and “Center” from the O button. Shoulder buttons, right stick, L3, R3, as well as U and Y do nothing.

Why can’t i detect half the buttons? Most people only seem to report trouble with the right stick…

@Thomasvq50: I guess you are using the latest public build of Corona to build and deploy your .apks?

Ouya is still not *officially* supported and it won´t be until the plugin is ready to use.

If you want to use the recent features announced in THIS thread then you have to use the recent Daily Build(s) of Corona.

But as you can see Corona is implementing new stuff for Ouya every week and I don´t think that the official plugin is so far away :slight_smile:

I have no idea about Corona´s timeline for upcoming features but I think that there will be a new public release in one or two months including the new graphics engine and hopefully the official Ouya plugin :wink:

Max / CineTek

@CineTek: You’re right, i’m using the standard free version. It crossed my mind, but I was really hoping that this wouldn’t be the problem. Oh well, i’ll just have to keep building for now and do the Ouya implementation when it becomes available in the free version. Or i could just end up buying a Pro license… i’ll have to think hard about this one :slight_smile:

In any case, thank you very much for your answer!

I would just wait a little bit and try to implement all the features of your game/app which do not require the full plugin yet.

And if you need any Ouya-like controls then you should take a look at the virtual joystick example in the code section :slight_smile:

I can confirm.  After installing the latest public release, the code I posted earlier no longer works.  I am getting the same limited button feedback that tvg50 describes.  In addition, the game no longer shows up in the Play section, I have to go to Make to get to it - and my build.settings are the same as before.

I am assuming that it will work again in the next official release.

Examples, documentation, and videos are now available:

https://devs.ouya.tv/developers/docs/corona.md

I’ll be working on the plugin for PRO users next…