Jump to content


Photo

Ouya Extension (Updated To Gms 1.3+!)


  • Please log in to reply
256 replies to this topic

#1 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 12 February 2013 - 06:05 PM

LATEST UPDATE: 14/03/2014
To use this now it is REQUIRED for you to use GM Studio version 1.3.xxxx or newer
 
Features (as of now) are listed below:

  • UUID / username
  • key/data saving
  • is_ouya() check
  • In app purchases (product lists, receipts, buy)
  • cursor hide/how

No gamepad as that is natively supported in gms now, but I MIGHT add it in the future since the default functions dont quite work as expected without the ODK.

 

Download:

I am giving this for free as usual, and it will stay free. But if you really appreciate the work I have done you can also buy it for a small ammount, you name your own price, anything is very appreciated and will go directly to me and my daily expenses;

 

Buy and download  /  Just download / Github

 

Contents of the .zip:
+ OUYA Extension/

|-+ OUYA/

| | + Java/

| | |- OUYAExt.java

|- OUYAExt.gmez

|- Dummy.txt

|- is_ouya.gml

|- OUYA_obj.object.gmx

 

Setting up everything:
Please read the OUYA docs if you are not sure about something basic, like connection between the OUYA and your PC or how to upload your game, etc.

If this is the first time you are setting up an etension I recommedn you to create a new, empty project.
 

- Extract the OUYA Extension .zip
- Go to the resources tree. right click on "Extensions" -> "import extensions".

- Select "OUYAExt.gmez" from the extracted zip folder.

 

After having added the extension sucessfully, we need to install the OUYA ODK in the runner, the ODK library (.jar) can be found on the ODK zip at
\OUYA-ODK\libs\ouya-sdk.jar
copy that file to:
%APPDATA%\GameMaker-Studio\Android\runner\libs
You can download the ODK package from the OUYA site

 
Key.der:
 
key.der is a certificate file wich is downloaded from https://devs.ouya.tv/developers/games, while you are logged in to your developer account (if you dont have one, make one as you WILL need it). This file is your game's fingerprint, pretty much like the keystore file from GameMaker's Android settings.

 

Once you have your key.der you can just drag it into your game's included files, just make sure it is not in any sub-directory. This is absolutely required for making IAPs in the OUYA.
 

 

Testing:

Below there is a small list of the functions and what they do, I will not spend much on explaining each as they should be very straightforward, but in case you have any doubts please refer to the example oject within the .zip, especially to get an idea how the flow of an IAP works:

 

ouya_init()

    Internal use only.

ouya_final()

    Internal use only.

ouya_set_dev_id(id)
    Set the new developer ID fo the extension. (deprecated)
ouya_get_dev_id()
    Get the current developer ID being used.
ouya_get_uuid()
    Get the Gamer Unique ID associated with the current logged account. Returns a string filled with zeroes if it is not available or still fetching.
ouya_is_ouya()
    Returns weter we are running on OUYA hadware or not. (only works on andoid!)
ouya_put_data(key, data)
    Assigns the given data (string) to the key.
ouya_get_data(key)
    Return the data string associated with this key.
ouya_iap_product_add(product)
    Adds the product id (string) to hte product list. returns its new id (real).
ouya_iap_product_remove(id)
    Removes the product fom the product list using the ID returned by _poduct_add().
ouya_iap_product_refresh()
    Refreshes the poduct list information. Will tiggeer an IAP event when sucessful.
ouya_iap_product_get_json()
    Return a json string with all of the products information available.
ouya_iap_create(developer_id)
    Setup all of the IAP information and do the handshake with OUYA.
ouya_get_username()
    Returns the username associated with the current logged acccount, or an empty string if failed or not yet available.
ouya_iap_product_buy(id)
    Triggers the buy dialogs for the product id using the ID returned by _poduct_add().
ouya_show_cursor(bool)
    Weter of not to show or hide the trackpad cursor.
 
 

Credits go to:

  • Me (Manuel Etchegaray) for developing the patch codes.
  • jtn0514 For borrowing his OUYA console to extensively test and debug everything works properly.
  • halo shg For making GMExtensions, wich was the core of the in app purchases when I made the initial patch.
  • The YoYoGames team for making such great software!

Edited by Manuel777, 28 August 2014 - 12:13 AM.

  • 17

#2 jtn0514

jtn0514

    GMC Member

  • GMC Member
  • 137 posts
  • Version:GM:Studio

Posted 12 February 2013 - 06:14 PM

Just another small thing to add...


Game maker studio Version 1.1.805 doesnt work too well with ouya, there are severe slowdowns (framerate on existing games are cut in half)

Ive gotten word from the folks at YYG that the next patch will fix this...

Edited by jtn0514, 12 February 2013 - 06:15 PM.

  • 0

#3 Arusiasotto

Arusiasotto

    GMC Member

  • GMC Member
  • 759 posts
  • Version:GM:Studio

Posted 12 February 2013 - 07:36 PM

Bravo!
  • 0

#4 Binsk

Binsk

    -Insane Kid-

  • GMC Member
  • 2934 posts
  • Version:GM:Studio

Posted 12 February 2013 - 08:19 PM

Amazing, mate! I haven't used it yet, but if Yoyo doesn't come out with something by the time I get my OUYA, I most certainly will be!
  • 0

#5 Lune

Lune

    hic quoque transibit

  • GMC Member
  • 917 posts
  • Version:GM:Studio

Posted 12 February 2013 - 08:24 PM

I'm very thankful for your work on this, gentlemen. I think it'd be ideal for YYG to provide a solution themselves, but that this workaround exists is enough for me.

Now I just have to wait for OUYA to ship their consoles to the likes of me, and I'll be able to get cooking!
  • 0

#6 FrozenMerk

FrozenMerk

    GMC Member

  • GMC Member
  • 1 posts
  • Version:GM8

Posted 12 February 2013 - 11:15 PM

Brilliant! Great job guys! :laugh:. Really looking forward to working with this.
  • 0

#7 lordvtp

lordvtp

    GMC Member

  • GMC Member
  • 643 posts
  • Version:GM:Studio

Posted 13 February 2013 - 02:52 AM

Waiting on my unit as well :ninja:
  • 0

#8 CGdfc

CGdfc

    GMC Member

  • GMC Member
  • 41 posts
  • Version:GM:Studio

Posted 13 February 2013 - 10:56 PM

:thumbsup: great job mate.
  • 0

#9 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 14 February 2013 - 04:38 PM

Updated to 140213. Fixed a crash when the onGenericMotionEvent (axis/joystick) attempted to use a nonexistant ds_map, may have started to appear because the hardware was sending repeated events before initializing the game, and it may not happen when the final hardware ships, but it is nice to have it patched anyway.

You may notice I removed the auto patcher, it was clumbsy and terriby buggy (come on, it was made with GM 8.1!), If we find a better way to automatize the whole patching process I may add it again, as of now, I will stick to the step-by-step guide.

Thanks for the support guys! :)

Edited by Manuel777, 14 February 2013 - 04:41 PM.

  • 3

#10 weapon121

weapon121

    GMC Member

  • GMC Member
  • 6 posts
  • Version:GM:Studio

Posted 15 February 2013 - 04:47 AM

Updated to 140213. Fixed a crash when the onGenericMotionEvent (axis/joystick) attempted to use a nonexistant ds_map, may have started to appear because the hardware was sending repeated events before initializing the game, and it may not happen when the final hardware ships, but it is nice to have it patched anyway.

You may notice I removed the auto patcher, it was clumbsy and terriby buggy (come on, it was made with GM 8.1!), If we find a better way to automatize the whole patching process I may add it again, as of now, I will stick to the step-by-step guide.

Thanks for the support guys! :)/>/>



Tested the demo and it works like a charm! Great job , it is highly appreciated! :)

Edited by weapon121, 15 February 2013 - 04:48 AM.

  • 1

#11 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 18 February 2013 - 06:33 PM

Sucesfully included In App Purchases into the patch on 180213, they are still on beta from OUYA, but they seem to work properly, altrough, they are a bit complex to get them working inside a game. Also, the steps of installing the patch have been updated a little bit to include them.

To help you understand how they work, I updated the .gmz example with a simple case of usage and lots of comments to explain their workings :)

Edited by Manuel777, 18 February 2013 - 06:35 PM.

  • 1

#12 Arusiasotto

Arusiasotto

    GMC Member

  • GMC Member
  • 759 posts
  • Version:GM:Studio

Posted 19 February 2013 - 09:40 AM

Sucesfully included In App Purchases into the patch on 180213, they are still on beta from OUYA, but they seem to work properly, altrough, they are a bit complex to get them working inside a game. Also, the steps of installing the patch have been updated a little bit to include them.

To help you understand how they work, I updated the .gmz example with a simple case of usage and lots of comments to explain their workings :)/>


Now that's some excellent team work.
  • 2

#13 Revenge

Revenge

    Dr. Broccoli

  • GMC Member
  • 573 posts
  • Version:GM8.1

Posted 25 February 2013 - 12:01 PM

Incredibly impressive, as said before, unless YoYo puts in a better default functionality by the time my Ouya arrives, I'll be using this and will fully credit you for it (it's the least we can do!). Very excited to be working with it, especially if everything can really translate over so smoothly! That's what put me off working with HTML5, so many tiny odd things that kept going wrong or things that just worked completely different to how it ran on studio, I really had to have started working for HTML5 from the ground.
  • 1

#14 jtn0514

jtn0514

    GMC Member

  • GMC Member
  • 137 posts
  • Version:GM:Studio

Posted 19 March 2013 - 01:13 AM

So it looks like official OUYA exporter might be on the way!!  Ouya tweeted at us saying that they are sending YYG an OUYA dev console.

 

Currently manuel and i have a working version with the most recent ODK release (1.0.0)

Payments seem to function as of right now, but receipts do not...  Controller had a few issues but these were resolved. Mainly had to do with left and right axis thumbsticks. I suspect ouya has changed the code to make them more responsive in the ODK libraries.


Edited by jtn0514, 19 March 2013 - 01:15 AM.

  • 0

#15 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 19 March 2013 - 02:42 AM

Updated to 130313! (whoa, a month without updates, sorry!!)

 

As the first and previous posts say, receipts are currently not working. Me and Jeff are working to fix that issue at 100% (It is the only bug we found as of now), so if we find a solution to it, we will update right away.

Also beware that there had been just too many changes on how IAPs work (reason why this update took us so long), so be sure to read trough all he installation process once again if you already installed the patch before, and read carefully troughout it if you havent  :thumbsup:

 

:pickle: !


  • 1

#16 Molinware

Molinware

    GMC Member

  • GMC Member
  • 35 posts
  • Version:Unknown

Posted 21 March 2013 - 09:58 PM

gmc.zip link, not working


  • 1

#17 MichaelLant

MichaelLant

    GMC Member

  • GMC Member
  • 35 posts
  • Version:GM:Studio

Posted 27 March 2013 - 06:52 AM

This is AMAZING! I registered asan ouya developer a while back in hopes that I could one day develope for it with game maker! looks like my dreams are coming true! Are you using an ouya developers console to test this or just by other means?


  • 0

#18 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 27 March 2013 - 08:39 PM

The only way of peoperly testing is trough the OUYA developers console, so that is what we are using :)
  • 0

#19 jtn0514

jtn0514

    GMC Member

  • GMC Member
  • 137 posts
  • Version:GM:Studio

Posted 31 March 2013 - 07:17 AM

Its been very slow lately with the progress on the patch here and its out of date already as OUYA keeps updating and adding new functions and changing a few old ones. I personally have been very busy and i know manuel777 has been as well.

 

Hopefully this week we will be able to get back on it and update the patch again with some working payment code thats 100 percent working instead of the stuff thats only 75-80 percent working at the moment.

 

 

@MichealLant : Yep official dev console is the only thing we are using at the moment.


Edited by jtn0514, 31 March 2013 - 07:20 AM.

  • 0

#20 exist

exist

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 15 April 2013 - 03:32 PM

First of all, THANKS for getting this working!

 

I updated to GMS 1.1.917 and re-patched it, but it seems like the analog sticks no longer work now.  Is this known issue or just my dev console having more analog stick issues?  Any quick fixes for this?  Will there be more updates to this patch or are we just waiting for the official Ouya support to be added now?

 

Thanks again!


  • 0

#21 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 15 April 2013 - 04:35 PM

First of all, THANKS for getting this working!
 
I updated to GMS 1.1.917 and re-patched it, but it seems like the analog sticks no longer work now.  Is this known issue or just my dev console having more analog stick issues?  Any quick fixes for this?  Will there be more updates to this patch or are we just waiting for the official Ouya support to be added now?
 
Thanks again!

We are not sure, lately I was unable to get on Skype and do further updates to the patch, especially since Mike said they were getting a console to implement it by themselves.. Last time me and Jeff chatted and tested was to update to the ODK 1.0.2, and everything but the receipts was working just fine (including the sticks), but we were unsucesful to get that bit working so we didnt pushed any updates as everything else remained the same (pushing an update will probably break purchases even more right now)


  • 0

#22 exist

exist

    GMC Member

  • New Member
  • 17 posts
  • Version:GM:Studio

Posted 15 April 2013 - 05:27 PM

Ok, thanks.  I'll see if I can figure out what may have stopped the sticks from working.  If nothing else I can just go back to an earlier version of GMS that was working fine with the patch.


  • 0

#23 Arusiasotto

Arusiasotto

    GMC Member

  • GMC Member
  • 759 posts
  • Version:GM:Studio

Posted 15 April 2013 - 06:10 PM

Unless your game is finished, i would hold off on making it work with this patch as an official implementation is coming. I also hear Gamestick is coming. Definitely a good time to be with Game Maker. Keep in mind, all the work atht OP and Co. did was excellent and greatly appreciated.


  • 1

#24 Trunks

Trunks

    GMC Member

  • New Member
  • 11 posts

Posted 08 May 2013 - 08:30 PM

Whatever site you used to host these files on seems to be non-operational anymore, which is terrible news for me, as my game's all ready to go on Ouya. Just need a one-time activation IAP and to get the settings just right.


  • 0

#25 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 09 May 2013 - 12:22 AM

Shoot, yeah, its temporarly unavailable until the end of the week, im afraid there is not much I can do until then :(

HOWEVER I will check again if I dont have a copy of it on dropbox, so you dont have to wait until I get back home..
  • 0

#26 dasrkrain

dasrkrain

    GMC Member

  • GMC Member
  • 196 posts
  • Version:GM:Studio

Posted 12 May 2013 - 03:11 AM

Does anyone have a copy of these downloads that they can post until Manuel777 gets home? I really want to try this ASAP! I've just received my Ouya and am already desperately trying to fully dev for it! :)


Edited by dasrkrain, 12 May 2013 - 03:11 AM.

  • 0

#27 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 12 May 2013 - 09:37 PM

Does anyone have a copy of these downloads that they can post until Manuel777 gets home? I really want to try this ASAP! I've just received my Ouya and am already desperately trying to fully dev for it! :)

 

Here: https://dl.dropboxus...-OUYA-Patch.gmz

 

Im not entirely sure if it is the same as the one I had one my website trough, but it should work anyway, just remember to set your own developer ID and key.der file 


  • 0

#28 dasrkrain

dasrkrain

    GMC Member

  • GMC Member
  • 196 posts
  • Version:GM:Studio

Posted 12 May 2013 - 09:51 PM

 

Does anyone have a copy of these downloads that they can post until Manuel777 gets home? I really want to try this ASAP! I've just received my Ouya and am already desperately trying to fully dev for it! :)

 

Here: https://dl.dropboxus...-OUYA-Patch.gmz

 

Im not entirely sure if it is the same as the one I had one my website trough, but it should work anyway, just remember to set your own developer ID and key.der file 

 

Thank you very much! This is awesome!


  • 0

#29 jtn0514

jtn0514

    GMC Member

  • GMC Member
  • 137 posts
  • Version:GM:Studio

Posted 20 May 2013 - 05:17 PM

Yeah i wish we could get the payment stuff working but i havnt had time and im sure manuel hasnt had time to bother with this patch lately.

 

Hopefully YYG comes out with their support for the OUYA soon... i know thats the only thing holding me up from publishing games really, but in the meantime this patch should hold those over that need controller support now.


Edited by jtn0514, 20 May 2013 - 05:18 PM.

  • 0

#30 xaviorbat

xaviorbat

    GMC Member

  • New Member
  • 3 posts

Posted 30 May 2013 - 01:38 AM

Hey this might be a dumb question but, do I have to have the Android adapter to use this? I just want to know before I go and try building a game using the file

 

Yes I realized what I said after I posted it and saw what forum I was on lol


Edited by xaviorbat, 30 May 2013 - 01:53 AM.

  • 0




1 user(s) are reading this topic

0 members, 0 guests, 1 anonymous users