Ha, apologies. I must have posted my response some time after loading the page and you had already posted yours. It will be a couple of weeks until I'm able to begin pairing the controller to my game, but I'll be happy to share whatever findings I can when I get there.
My Console arrived yesterday and my plan for the weekend is to get as much done on an ODK-Native Extension as I can. Once I get it to certain point I'll create a repo on Github so others can grab it or contribute if they wish to.
My Console arrived yesterday and my plan for the weekend is to get as much done on an ODK-Native Extension as I can. Once I get it to certain point I'll create a repo on Github so others can grab it or contribute if they wish to.
I'm hammering away at it, had some initial problems on the weekend getting my OUYA and Macbook talking. Turned out I had bad USB cable cutting in and out and giving me problems.
I've got basic crosstalk between the native app and extension going and expect to make a lot of progress today.
Jumping in a little late to the game - but I started working on an ANE for the Controller before I saw this post and I have it working.
If you try using NativeApplication in AS3, you can get the key codes for some of the buttons, but "Y" doesn't work, neither trigger nor shoulder buttons work and both thumbstick buttons report the same value.
Moving to the ANE, I have the onKey events for all of the buttons, D-PAD etc working. I'll have the motion events for the Thumbsticks and Analogue triggers in the next couple of hours and have the ANE available either by the close of play today or early tomorrow.
I know it's bad form to jump on in after Game_Radiator's already underway... so perhaps we can cross implementations/solutions for a better piece of kit for the community?
It always happens. I can't speak for Game Radiator but I'm just glad that someone has it working. Maybe GR likes his implementation better, maybe he will just save himself dev time and use yours.
I don't really mind as long as we can get our little mittens on a version.
Looking forward to you releasing it. And well done!
It always happens. I can't speak for Game Radiator but I'm just glad that someone has it working. Maybe GR likes his implementation better, maybe he will just save himself dev time and use yours.
I don't really mind as long as we can get our little mittens on a version.
Looking forward to you releasing it. And well done!
Thanks!
It'll be nice to see what approaches we've both taken - if we've tackled it even remotely similar or if one approach is vastly superior to another... or even if there are bits that are useful from one that need to be reworked etc.
(I'm actually thinking GR's will be superior to my own, as my ANE experience is pretty limited)
Anyway, analogue sticks and triggers are now in :-)
Need to neaten up everything, actually tell the user what the key codes mean at the AS3 end and fix a couple of issues with some value checking... but I'll have the ANE and a sample application available in an hour or two!
It's VERY early on in development, I haven't had time to write any more detailed instructions, but there's a sample project and in there is a folder called "ane" with the WIP OUYA Controller ANE.
@GaslightGames Don't worry about jumping in. In fact Thanks for jumping in. I'm doing this out of necessity not because I think my solutions would be best or anything like that. My own ANE making experience is pretty limited as well, so I wouldn't count on my solution being in anyway the "superior" version. :D
Great work, Gaslight! You've done us all a big favor! Thanks for making such short work of it, and releasing it for us to play with and (perhaps) contribute to.
@GaslightGames Don't worry about jumping in. In fact Thanks for jumping in. I'm doing this out of necessity not because I think my solutions would be best or anything like that. My own ANE making experience is pretty limited as well, so I wouldn't count on my solution being in anyway the "superior" version. :D
Ah, cool :-)
Didn't want to be stepping on anyone's toes, as it were.
I've been lurking this thread for awhile now, I just wanted to chime in and say thank you!
No problem :-)
It was high on my to-do list for OUYA development. We've used AIR in a number of applications and so have some understanding and a bit of a code-base, so figured if we can just get to use those elements that are not native to AS3, then we could build some games that little bit quicker/easier!
Sweet, good work! Although I can't test it myself as I don't have a dev console.
If you have any Android device, then you can run the APKs provided in the ODK in order to make said Android device behave like an OUYA. Although, without controllers, and this being about a Controller ANE... makes my suggestion a little pointless, sorry! :-P
Great work, Gaslight! You've done us all a big favor! Thanks for making such short work of it, and releasing it for us to play with and (perhaps) contribute to.
Thanks!
Was a bit of a pig to remember the Android specifics and there are still a number of things that can be improved and some areas that I've noticed I've not included - like support for multiple controllers!
But these are all things that come about once the Extension gets out into the World.
Has anyone had a chance to give this early version a run?
I've also realised that as AS3 developers, we're likely going to want IAP, too.
I was thinking of tackling this one after the Controller ANE is at a good point, and creating the IAP ANE as a separate extension, rather than clogging the Controller ANE.
Would anyone be interested in such an ANE?
Would people prefer it be integrated into an "ANE for OUYA"?
Suggestions/Comments/Ideas for the current ANE and any future progression?
I will be happy to contribute. I'm winding down a project in progress to switch gears for the Create contest, so I'll be able to test soon. Would you mind setting up a Git or SVN repository so we could actually collaborate?
I need to do the initial "get everything working" effort, and I'll get on a test soon after. Maybe this evening?
Gaslight, your extension looks great so far. I will give it a good test today in my game.
Personally, it wouldn't bother me either way if it was just one ANE or two. Having IAP abilities will be awesome as everyone who wants to ship a title on OUYA will need it.
I also suggest emailing Boxer8 and letting them know that you have a working ANE. They might make yours the official version and bundle it with the ODK.
I will be happy to contribute. I'm winding down a project in progress to switch gears for the Create contest, so I'll be able to test soon. Would you mind setting up a Git or SVN repository so we could actually collaborate?
I need to do the initial "get everything working" effort, and I'll get on a test soon after. Maybe this evening?
-Clayton "Tron" Grey
I'll absolutely be setting up a GitHUB, but the code is... well, let's just say hurried and messy :-)
There are a few more things I want to add to it, so once those are in, then I'll upload to Git (or similar) and share the code with everyone.
Gaslight, your extension looks great so far. I will give it a good test today in my game.
Personally, it wouldn't bother me either way if it was just one ANE or two. Having IAP abilities will be awesome as everyone who wants to ship a title on OUYA will need it.
I also suggest emailing Boxer8 and letting them know that you have a working ANE. They might make yours the official version and bundle it with the ODK.
Gaslight, I may be wrong but don't you need to include a SWC or at least an interface class in the demo so we can access the ANE?
I didn't see it in your archive file.
I have 3 separate projects.
The JAR building library project in Eclipse.
The SWC building library project in FB 4.7.
And finally the APK building app project, also in FB 4.7.
I have a simple script that, once you enter the necessary fields (source libraries, paths etc) will then take the library.swf (extracted from the SWC) and build the ANE. In any FB applications, you just need to include the ANE and you can get access to the SWC/AS3 interface stuff, as FB can read the ANEs :-)
Edit:
I'm also diving into multi-controller support, so a large chunk of the Java side needs to be re-written... which is another reason why I'm holding off uploading to GitHub or similar, as the changes will be vast!
Ah, I didn't know that FB and FD could get the info out of ANE files. I've always used Milkman Games' extensions and he has SWC files to go with them. Thanks for that. :)
Comments
I'm tempted to just write my game with keyboard controls and then update it when someone else makes the bindings. Is that lazy of me? :p
CEO, Rocket Bunny Games
CEO, Rocket Bunny Games
I've got basic crosstalk between the native app and extension going and expect to make a lot of progress today.
CEO, Rocket Bunny Games
If you try using NativeApplication in AS3, you can get the key codes for some of the buttons, but "Y" doesn't work, neither trigger nor shoulder buttons work and both thumbstick buttons report the same value.
Moving to the ANE, I have the onKey events for all of the buttons, D-PAD etc working. I'll have the motion events for the Thumbsticks and Analogue triggers in the next couple of hours and have the ANE available either by the close of play today or early tomorrow.
CEO, Rocket Bunny Games
Enjoy :-)
No problem :-)
If you have any Android device, then you can run the APKs provided in the ODK in order to make said Android device behave like an OUYA. Although, without controllers, and this being about a Controller ANE... makes my suggestion a little pointless, sorry! :-P
Thanks!
I was thinking of tackling this one after the Controller ANE is at a good point, and creating the IAP ANE as a separate extension, rather than clogging the Controller ANE.
Would anyone be interested in such an ANE?
CEO, Rocket Bunny Games
CEO, Rocket Bunny Games
Good idea!
I have 3 separate projects.
CEO, Rocket Bunny Games