It was pretty easy - did most of it within the first hour or so. It took more time figuring out how to side load the player on to the device - in the end I used dropbox.
Repositioning everything took 2 or 3 hours to get it right - I currently have to press a button on my monitor to swap between the PC and the Ouya - so it took ages.
Four players and IAP shouldn't take that long - but busy during the day today (and all week during the day) supporting my school reports program.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
It's not that bad, it's not that good either. It's worth $99 though and is a good machine to get things ready for more of the same type of console, Android built into TV's etc...
The same game ideas/code for Ouya should work fine with virtually no changes (apart from control key codes) on things like GameStick, etc...
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
It's a lot better than the Pi (I have 2 pi model b computers). Not seen the Pi (first hand) running Android though, seen the videos but that was a long time ago and possibly vapourware.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
To my mind the Ouya's greatest strength is also its greatest weakness. The strength is the openness and the ability for anyone to join the party and actually *write* games rather than just consume them. The problem with this is that it results in a marketplace of very variable quality. This was the comment made in the @Mells link above and, most likely it will only get worse.
I see the same thing with the (various) Android marketplaces. I suppose this quality range hasn't killed Android but it might do with Ouya. The question is, how can one continue with the "democratization" of programming and still achieve the feel of quality that one senses in Apple's app store?
I think Ouya (and Gideros) or some of the cheap Android tablets (and Gideros) could well be great educational tools for teaching kids to program; much more so than the R-Pi, which to my mind is just too "geeky". Not only can one learn to create stuff (games) with these tools but they have built-in braggability. What kids wouldn't want to show off the results of their computer studies by showing off the results to their mates?
What do I do with key.der for Ouya IAP ? The ouya docs say to include it, but the plugin docs don't say how.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
The first thing you will need to do is ensure that your application key is included in your application. You can down load the DER representation of your application key from the games area of the developer portal. To create a Java representation of the key you should use the following code:
// Create a PublicKey object from the key data downloaded from the developer portal. try { X509EncodedKeySpec keySpec = new X509EncodedKeySpec(APPLICATION_KEY); KeyFactory keyFactory = KeyFactory.getInstance("RSA"); mPublicKey = keyFactory.generatePublic(keySpec); } catch (Exception e) { Log.e(LOG_TAG, "Unable to create encryption key", e); } Once you have your key embedded you will need to create a purchase listener which handles responses from the server. Each purchase will have a unique purchase ID. In this example we use a Map of these IDs to the Product being purchased to allow us to determine what has been purchased :"
It also doesn't say where this key should be placed in the directory of files.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Without this calling the IAP stuff just stops the app and exist - no error code, nothing - at least that's what I think is causing it. If the IAP code is skipped then no exit and all works fine.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Ah I thought the key.der file you download can go anywhere in your exported gideros project and I didn't know you had to do anything with it as such it either.
Edit: I just read those IAP docs it's seems perhaps not then - bugger.
Maybe that's all that needs to be done - so should I just shove it into the resources?
The Ouya docs are not very clear about all this.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
You can use that to open key.der (which you download after uploading your game to ouya.tv) and see the hex values - go to the Edit menu, Select All, Copy As-> C Data, and then you can ctrl-v it into TestOuyaFacade to get the table data. Put a (byte) in front of each value, make sure you end the last value with a comma, and you're gold!"
Then in the Ouya ODK, in the 'IapSampleActivity.java' source code you see:
If so I can use Hexplorer to input the keydata, or the ouya init should load in the key (into APPLICATION_KEY) at init? (with the file being put in a specific place) ???
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I put the key (java 'ised) ( private static final byte[] APPLICATION_KEY = {(byte) 0x30,.... ) into the BacteriaOuyaActivity.java file. Then tried running it again:
This crashes out the app: ouya:requestReceipts()
This doesn't do anything (like it's ignored): ouya:requestPurchase("BacteriaUnlimitedPlay")
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@SinisterSoft ah I was not aware that could only be provided in bytes. in init function I imagined, there should be provided a developer ID an an app key like:
ouya:init(devId, appKey)
and I imagined app key would be String format, which I convert to bytes on Java part. Let me read more on this. In the mean time well app key somehow needs to be passed to ouya:init as second parameter or you can check and modify GOuya.java adding app key there and using it inside
Ok from what I've read der file is only needed to get app key and for iap to work only app key is needed. The process of getting app key from der file for now is unknown to me, but what @SinisterSoft has seems to be correct. Only problem is passing it to ouya plugin from lua. @SinisterSoft is it possible to get string representation of app key? Like
String str = new String(bytes);
And then pass it to ouya:init method
I don't know how comfortable it is to pass byte from lua to Java?
I put my devid in eg "xxx.xxx.xxx..xxx" then for the appKey I used "com.sinistersoft.bacteria" as I was unsure what to put and it expected a string of some kind.
Now it looks like for appkey you meant the contents of the key.der file.
Maybe if there is a way of entering string bytes written as hex into lua then I can feed them in as a string to ouya:init(devId,appkey) ?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Haha I just finished all the key input stuff and testing of my next (and first paid) Ouya app and wanted to add Ouya IAP on Friday to finish it off, but now I'm really confused.com LOL. When/if this is fixed can somebody write up how exactly you add Ouya IAP to a gideros app as I am clueless. This key.der file seems a right PITA. Other than that all good.
It's easy to make into a string that can be entered in Java - but I have no idea on what to do with Lua - shouldn't be hard though. If I figure it out I'll let you know.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I'm probably going to trigger Ouya IAP from a level or score counter in the current app so when player reaches level 3 or scores 100,000 for example the IAP boots in. Whilst this sounds easy in practice you have to bear in mind a) I've never used IAP before in any app ever ...and b) an extra layer of confuddlement is hitting me hard now via Lua/Gideros. Almost fried my brains converting my app form touch to buttons in last few days with all the art changes etc. My brain/eyes hurt LOL :P Can somebody make a simple gideros example template project so IAP can be picked out of it or something? All this key and receipt stuff is not my bag at all.
Strings in LUA are unicode, so maybe passing the binary data in a string isn't such a good idea.
Maybe a byte array that could be pointed to and the initOuya routine sorts this out?
Then all we have to do is make a byte array of the hex data, a simple util could be written to do this in a few minutes.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Most probably I will have to write a Java program to generate string from key.der which can be passed to Lua, can anyone share any test.der file they might have?
Go to the Ouya.tv website. Create a developer account (it's free). Add a program. You will then see a download link for your very own key.der file.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
will be waiting for feedback
@TheOddLinguist thats completely ok
Likes: SinisterSoft
Repositioning everything took 2 or 3 hours to get it right - I currently have to press a button on my monitor to swap between the PC and the Ouya - so it took ages.
Four players and IAP shouldn't take that long - but busy during the day today (and all week during the day) supporting my school reports program.
https://deluxepixel.com
Consensus on Ouya $99 Android Game Console: It Stinks (via daringfireball.net)
The same game ideas/code for Ouya should work fine with virtually no changes (apart from control key codes) on things like GameStick, etc...
https://deluxepixel.com
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
https://deluxepixel.com
I see the same thing with the (various) Android marketplaces. I suppose this quality range hasn't killed Android but it might do with Ouya. The question is, how can one continue with the "democratization" of programming and still achieve the feel of quality that one senses in Apple's app store?
I think Ouya (and Gideros) or some of the cheap Android tablets (and Gideros) could well be great educational tools for teaching kids to program; much more so than the R-Pi, which to my mind is just too "geeky". Not only can one learn to create stuff (games) with these tools but they have built-in braggability. What kids wouldn't want to show off the results of their computer studies by showing off the results to their mates?
best regards
Likes: SinisterSoft, atilim
https://deluxepixel.com
Likes: SinisterSoft
http://forums.ouya.tv/discussion/1612/how-to-use-key-der-file
Here is the text from the ODK docs:
"Making a Purchase
The first thing you will need to do is ensure that your application key is included in your application. You can down load the DER representation of your application key from the games area of the developer portal. To create a Java representation of the key you should use the following code:
// Create a PublicKey object from the key data downloaded from the developer portal.
try {
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(APPLICATION_KEY);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
mPublicKey = keyFactory.generatePublic(keySpec);
} catch (Exception e) {
Log.e(LOG_TAG, "Unable to create encryption key", e);
}
Once you have your key embedded you will need to create a purchase listener which handles responses from the server. Each purchase will have a unique purchase ID. In this example we use a Map of these IDs to the Product being purchased to allow us to determine what has been purchased :"
It also doesn't say where this key should be placed in the directory of files.
https://deluxepixel.com
https://deluxepixel.com
Edit: I just read those IAP docs it's seems perhaps not then - bugger.
The Ouya docs are not very clear about all this.
https://deluxepixel.com
"I used a free program called Hexplorer (http://sourceforge.net/projects/hexplorer/)
You can use that to open key.der (which you download after uploading your game to ouya.tv) and see the hex values - go to the Edit menu, Select All, Copy As-> C Data, and then you can ctrl-v it into TestOuyaFacade to get the table data. Put a (byte) in front of each value, make sure you end the last value with a comma, and you're gold!"
Then in the Ouya ODK, in the 'IapSampleActivity.java' source code you see:
"private static final byte[] APPLICATION_KEY = {
(byte) 0x30,(byte) 0x81,(byte) 0x9f,(byte) 0x30,(byte) 0x0d,(byte) 0x06,(byte) 0x09,(byte) 0x2a,
(byte) 0x86,(byte) 0x48,(byte) 0x86,(byte) 0xf7,(byte) 0x0d,(byte) 0x01,(byte) 0x01,(byte) 0x01,
.
.
.
(byte) 0xfe,(byte) 0xbe,(byte) 0x34,(byte) 0xc6,(byte) 0xc3,(byte) 0x02,(byte) 0x03,(byte) 0x01,
(byte) 0x00,(byte) 0x01,
};
"
If so I can use Hexplorer to input the keydata, or the ouya init should load in the key (into APPLICATION_KEY) at init? (with the file being put in a specific place) ???
https://deluxepixel.com
This crashes out the app:
ouya:requestReceipts()
This doesn't do anything (like it's ignored):
ouya:requestPurchase("BacteriaUnlimitedPlay")
https://deluxepixel.com
in init function I imagined, there should be provided a developer ID an an app key like:
Let me read more on this.
In the mean time well app key somehow needs to be passed to ouya:init as second parameter or you can check and modify GOuya.java adding app key there and using it inside
@SinisterSoft is it possible to get string representation of app key?
Like
I don't know how comfortable it is to pass byte from lua to Java?
ouya:init(devId, appKey)
I put my devid in eg "xxx.xxx.xxx..xxx" then for the appKey I used "com.sinistersoft.bacteria" as I was unsure what to put and it expected a string of some kind.
Now it looks like for appkey you meant the contents of the key.der file.
Maybe if there is a way of entering string bytes written as hex into lua then I can feed them in as a string to ouya:init(devId,appkey) ?
Anyone have any ideas on how to do this?
Likes: MobAmuse
https://deluxepixel.com
Likes: fxone, SinisterSoft
Likes: MobAmuse
https://deluxepixel.com
Maybe a byte array that could be pointed to and the initOuya routine sorts this out?
Then all we have to do is make a byte array of the hex data, a simple util could be written to do this in a few minutes.
https://deluxepixel.com
Edit:
Or I should consult @atilim on this one
https://deluxepixel.com
in the meantime can you
1. add that key file to the Gideros project
and read it into a string
Likes: MobAmuse
https://deluxepixel.com
Likes: MobAmuse
https://deluxepixel.com
and requestProducts?
or requestUserId?
will have to start imagining what might be the problem there
Will give them a go later.
Likes: MobAmuse
https://deluxepixel.com