Jump to content


Photo

Ouya Extension (Updated To Gms 1.3+!)


  • Please log in to reply
260 replies to this topic

#1 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3553 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  / Github (Download available)
 
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, 10 November 2014 - 10:41 PM.

  • 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
  • 760 posts
  • Version:GM:Studio

Posted 12 February 2013 - 07:36 PM

Bravo!
  • 0

 

"It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter." - Nathaniel Borenstein

 

 

 


#4 Binsk

Binsk

    -Insane Kid-

  • GMC Member
  • 2967 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

NEWS FLASH! You can't get to heaven by your works. No chance. Hopeless. Give up now. No amount of works will get you anywhere, in fact all your efforts have been botched years ago because you already missed perfection the first time you lied, stole, or performed any of those other lovelies.

 

That said, do you want to go to heaven? Not the hellish picture given by cartoons. You know, the nightmarish one where you are renting a cloud and harp? I mean, holy crap, where did that come from? I am talking about a bonafide city, people, designed by God no less. Heck, read John's Revelation 21 if you want details. Getting to heaven is extremely simple, actually, the how and why is spelled out in Paul's letter to the Romans, summarized in Romans 10:9,10. God lived a perfect life and died in your place, covering every one of your mistakes and failures past and future. All you have to do is believe that He did what he said He did and accept the gift. Bam, you're saved. Done deal. Complicated, no? Questions? PM me.


#5 Lune

Lune

    hic quoque transibit

  • GMC Member
  • 991 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

AbeBlyTwitch.png
AbeBlyTwitter.png


#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
  • 744 posts
  • Version:GM:Studio

Posted 13 February 2013 - 02:52 AM

Waiting on my unit as well :ninja:
  • 0

lord5.png

 


#8 CGdfc

CGdfc

    GMC Member

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

Posted 13 February 2013 - 10:56 PM

:thumbsup: great job mate.
  • 0

#9 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3553 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
  • 3553 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
  • 760 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

 

"It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter." - Nathaniel Borenstein

 

 

 


#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
  • 3553 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
  • 3553 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
  • 3553 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
  • 760 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

 

"It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter." - Nathaniel Borenstein

 

 

 


#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
  • 3553 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
  • 201 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
  • 3553 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
  • 201 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

#31 rafael_lima

rafael_lima

    GMC Member

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

Posted 02 June 2013 - 06:55 AM

Do you guys believe its somehow possible to implement this:

https://devs.ouya.tv...docs/purchasing

 

into the RunnerActivity.java file by hard-coding it into the file, make the necessary changes in the code for your own game, and make it work? We would need to have a way to execute the proper methdos within GameMaker Studio, but I guess there's some way to do that, judging by what Manuel did to make the controls work....


  • 0

#32 Manuel777

Manuel777

    InvaderGames

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

Posted 02 June 2013 - 03:52 PM

I had that stuff working for a while, it IS in the installation tutorial from the first page, altrough there had been 4 updates of the ODK ever since and we havent had the time to fix whatever is broken with it (it requires lots of time to do work online..) 

 

Most importantly, whats broken is the license verification (key.der file) for the In App Purchases, my Java isnt that great so I found it a bit difficult to debug whats going on with that particular bug.. the files are there, even the IAP ones, so if you (or anyone who has access to an OUYA actually) wants to try to fix them, please give it a shot!  :thumbsup:


  • 0

#33 rafael_lima

rafael_lima

    GMC Member

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

Posted 02 June 2013 - 09:13 PM

But the tutorial on the 1st page of this thread don't do nothing about IAP transactions, it only covers the Joystick input, right?


  • 0

#34 Manuel777

Manuel777

    InvaderGames

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

Posted 02 June 2013 - 09:25 PM

But the tutorial on the 1st page of this thread don't do nothing about IAP transactions, it only covers the Joystick input, right?

 
Nono, it does include IAPs, especifically the gmc.zip files, please read the OP completely.

Edited by Manuel777, 02 June 2013 - 09:29 PM.

  • 0

#35 rafael_lima

rafael_lima

    GMC Member

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

Posted 02 June 2013 - 11:04 PM

Duh, I'm sorry. I didn't see anything regarding IAP on the activity_runner.java file and for some stupid reason I thougth all the changes you had made were there.

Now I understood what you've done. I'll take a look at your work, but I doubt I can make it work anyway :) It weill be fun to try though :)


Edited by rafael_lima, 02 June 2013 - 11:04 PM.

  • 0

#36 PanicBomber

PanicBomber

    Panic Arts

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

Posted 03 June 2013 - 12:11 AM

is yoyogames going to put ouya support for GMS as a defaulth? I think its kinda lame that developers have to do this by their selves.


  • 0
I make games with Game Maker: Studio and distribute them via STEAM, PSN and XBOX Live.

#37 cuetzpalin

cuetzpalin

    GMC Member

  • New Member
  • 8 posts

Posted 03 June 2013 - 12:26 AM

is yoyogames going to put ouya support for GMS as a defaulth? I think its kinda lame that developers have to do this by their selves.

 

As far as I know, yes... the Ouya team sent them a console. I even remember reading somewhere that the plans were to include it with the Android export. (which is very logic)

 

It strikes me, however, how they (YoYo) didn't pledged for a "developer one" during the Kickstarter, so they could get one by past december.

 

And, as it is usual from YoYo, they haven't said anything official yet.

 

I REALLY hope they include it in the next major GM:S update.

 

They're moving to bigger and better offices, and they said they would be doubling its staff... I still fail to see how with so many people around, their communication and customer support still suck this bad.


  • 0

#38 PanicBomber

PanicBomber

    Panic Arts

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

Posted 03 June 2013 - 12:52 AM

yeah YoYo is slow or not even answering questions. There are still stupid bugs like automatic centered ads in iOS, which work well in android. You cant get absolute left ads in ios :D

I'm soon getting my gamestick and hoping the games work on it...


  • 0
I make games with Game Maker: Studio and distribute them via STEAM, PSN and XBOX Live.

#39 Manuel777

Manuel777

    InvaderGames

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

Posted 03 June 2013 - 01:00 AM

I'm soon getting my gamestick and hoping the games work on it...


afaik, it will be the same as with the OUYA.
  • 0

#40 pucone

pucone

    GMC Member

  • GMC Member
  • 77 posts
  • Version:Unknown

Posted 03 June 2013 - 01:58 AM

quick question about this patch! when i try to run it on the ouya, I get an error:

ERROR in
action number 1
of Create Event
for object controller_obj:

Data structure with index does not exist.
at gml_Script_ouya_iap_product_list

It's referring to ouya_map, which doesn't exist because of this script:

    while (move == false) {
        if indexmatch != ouya_map {
            move = true;
            show_debug_message(">> Ds_map found: "+string(ouya_map))
        }
        else if get_timer()-delta > 1000000 {
            move = true;
            ouya_map = 0;
            show_debug_message(">> Could not find any ds_map, reset to zero");
        }
        else {
            ouya_map ++;
        }
    }

It doesn't seem the id for the data structure is ever actually assigned to ouya_map! 

 

Anyway, it's an easy fix and if I add "ouya_map = indexmatch" the error goes away, I just wanted to check and see if I was misunderstanding something about how this is meant to work.

 

(that said, once it IS running, it claims to not be running on a real ouya and the sticks/buttons don't work, so its very possible I'm doing something wrong somewhere)


  • 0

#41 Manuel777

Manuel777

    InvaderGames

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

Posted 03 June 2013 - 02:10 AM

It seems you missed the part where we add the ds_map in RunnerActivity; (check the OP for more details)
 

After that, and inside the class declaration, paste this code:

public static final int OUYA_DS_MAP = RunnerJNILib.dsMapCreate();
It should look like this:
public class RunnerActivity extends Activity implements SensorEventListener
{
// The Singleton for RunnerActivity
public static final int OUYA_DS_MAP = RunnerJNILib.dsMapCreate();

public static RunnerActivity CurrentActivity;
[..]

Edit: Just a bit of clearification on this, since we dont have proper extension support for Android right now, I am forced to create some sort of 'communication' method between the Runner (compiled java) and GML, this is done via OUYA_DS_MAP (java), wich is then recognized by the ouya_setup() script (GML), and it is very important that you execute this script before any other ds_map is created, since there is no actual way of testing if a ds_map exists or not in GML. 


Edited by Manuel777, 03 June 2013 - 02:22 AM.

  • 0

#42 pucone

pucone

    GMC Member

  • GMC Member
  • 77 posts
  • Version:Unknown

Posted 03 June 2013 - 03:18 AM

Thanks for the quick response! I think I have a better idea of what's happening here, though I did already have that line in RunnerActivity.java.


Edited by pucone, 03 June 2013 - 03:25 AM.

  • 0

#43 Manuel777

Manuel777

    InvaderGames

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

Posted 03 June 2013 - 03:56 AM

If you have included that line, then you should be receiving an output like this on your debug console:

 

">> Ds_map found: 0"

 

I just tested to see if the ds_map trick was working in 1.1.1013 and it does, even tested with the example posted in the first page, so you must have missed something :)


  • 0

#44 Chinafreak

Chinafreak

    GMC Member

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

Posted 03 June 2013 - 02:07 PM

It's work fine on OUYA! Perfect!

 

But I've a problem, I try to run my ouya-games to my Nexus 7 and I get an error:

 

37qdE.png

 

something is wrong with the script "is_ouya()"... :/

 

Log:

 

37qgh.png


Edited by jantest34, 03 June 2013 - 02:09 PM.

  • 0

#45 rafael_lima

rafael_lima

    GMC Member

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

Posted 03 June 2013 - 02:13 PM

 

Now, I am using Halo shg GMExtensions method to include In App purchases into GMS, so go to that topic and follow only step 1 in the first post. Once that is done, extract the java extension files (gmc.zip) inside this folder:
%appdata%\GameMaker-Studio\Android\runner\

 

Did you do the above step?

If you don't, you'll get a lot of "get_string" requests that seems to make no sense. It's because that step will overwrite the GM get_string with method with something that makes the ouya.java class communicate with gamemaker


  • 0

#46 Chinafreak

Chinafreak

    GMC Member

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

Posted 03 June 2013 - 02:58 PM

 

 

Now, I am using Halo shg GMExtensions method to include In App purchases into GMS, so go to that topic and follow only step 1 in the first post. Once that is done, extract the java extension files (gmc.zip) inside this folder:
%appdata%\GameMaker-Studio\Android\runner\

 

Did you do the above step?

If you don't, you'll get a lot of "get_string" requests that seems to make no sense. It's because that step will overwrite the GM get_string with method with something that makes the ouya.java class communicate with gamemaker

 

Okay, I'll try


  • 0

#47 Chinafreak

Chinafreak

    GMC Member

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

Posted 03 June 2013 - 03:50 PM

 

 

Now, I am using Halo shg GMExtensions method to include In App purchases into GMS, so go to that topic and follow only step 1 in the first post. Once that is done, extract the java extension files (gmc.zip) inside this folder:
%appdata%\GameMaker-Studio\Android\runner\

 

Did you do the above step?

If you don't, you'll get a lot of "get_string" requests that seems to make no sense. It's because that step will overwrite the GM get_string with method with something that makes the ouya.java class communicate with gamemaker

 

 

 

Hmm, dont work, too :/ And that's not on step event, that's on create event!


Edited by jantest34, 03 June 2013 - 03:56 PM.

  • 0

#48 Manuel777

Manuel777

    InvaderGames

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

Posted 03 June 2013 - 04:07 PM

You need to do a full compile, doing a test run / debug wont work...


  • 0

#49 Chinafreak

Chinafreak

    GMC Member

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

Posted 03 June 2013 - 04:11 PM

You need to do a full compile, doing a test run / debug wont work...

waah, dont work, too >_<

 

37u34.png


  • 0

#50 Chinafreak

Chinafreak

    GMC Member

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

Posted 03 June 2013 - 04:26 PM

Okay, I exported example.gmz and tested it: still the same problem but more error:

 

 

Spoiler

 


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users