Does OUYA support Expansion Files?

Expansion Files are extra files external to the APK that get automatically installed with your app, but can be updated independently so your APK code changes don't require re-downloading all the data. This is used on Android for pretty much all games that have large amounts of data.


Being a gaming platform, I would assume OUYA supports this, but since it has it's own app store, I need to check. Does anyone know?

I'm stuck right now for publishing my game until I find out about this. If it doesn't support it, is there an equivalent option that doesn't require me to host extra data files myself?

Thanks!

Comments

  • ShushShush Posts: 178Member
    edited August 2013
    It supports it in the fact that it doesn't go out of it's way to stop you organising your assets or expansion files in any manner you like.

    Check out this thread for some ideas http://forums.ouya.tv/discussion/2268/fopen-file-io-reading-and-writing-files#latest

    One way of achieving what you want is to store your files on a host like Amazon S3 and having them downloaded to your games /data/data/com.mycompany.mygame private area as part of the installation process.
    Post edited by Shush on
  • JohnathanVeganJohnathanVegan Posts: 5Member
    I guess my main question is: Does the OUYA app store have the option to host expansion files? I'm planning to release my game for free... I don't want the game to cost me money by having to pay for extra web hosting bandwidth, I'm hoping OUYA will host the files.
  • ShushShush Posts: 178Member
    OUYA only hosts your assets files if they are embedded within the APK using the standard Android build system.

    If you're planning on releasing a free game, then the power and flexibility of separated assets probably isn't needed, right?

    But if you must have separated assets there's nothing stopping you from hosting them on any device with storage capabilities and access to the Internet, your own PC for example.



  • JohnathanVeganJohnathanVegan Posts: 5Member
    The issue is it's 200 MB of assets. I'd prefer to not force people to re-download the whole 200 MB every time I fix a bug in the code, but if that's how it's gotta be, then that's how it's gotta be.
  • bobbyjohnson82bobbyjohnson82 Posts: 38Member
    What if you built a second apk that only held the assets and you move them to the sdcard with .....assetmanager. It's a little different but it may have benefits
  • KonajuGamesKonajuGames Posts: 560Member
    What if you built a second apk that only held the assets and you move them to the sdcard with .....assetmanager. It's a little different but it may have benefits
    And the second apk comes from... where?
  • bobbyjohnson82bobbyjohnson82 Posts: 38Member
    You upload it to the store. There's no policy against it and I'm sure that they won't mind hosting it.
  • KonajuGamesKonajuGames Posts: 560Member
    You upload it to the store. There's no policy against it and I'm sure that they won't mind hosting it.
    If (a strong 'if') they did allow it to be uploaded (which I highly doubt), you would still have to ask the user to go to the Store and manually download the assets apk.  That is crazy talk.
  • bobbyjohnson82bobbyjohnson82 Posts: 38Member
    I don't think it is. I think with the way the ouya store works it could be a real good thing. You can set up the game to play a level without the extra assets and if the user doesn't like the game then it saves him time and the ouya server .....something lol. There's been a couple times when I've been pretty disappointed  after spending 15 minutes to download some game I'm about to uninstall.

          I don't really wanna get into this part too much because it can be easily mistaken for something else but I'm sure that ouya wouldn't mind hosting the extra app data since your paying them .30 cents on every dollar
  • ShushShush Posts: 178Member
    edited August 2013
    APK's are self contained, self referenced, and self launching modules, there is no concept of separate data within the OUYA model, whilst the Android model has Expansion files, (http://developer.android.com/google/play/expansion-files.html).

    Currently the way it's setup, it's one APK per store published game, which funnily enough is the exact model that Google Play used to use, (but without the 50MByte limitation). With both models you can separate data by adding extra code that installs that data after the APK has been installed in the normal way. The data would be typically hosted on an external server as has been noted in previous posts in this thread.

    As you have suggested there are ways to build "installer" APK's that install other APK's, (which are generally viewed as hacks meant for testing or development), the simplest being that the Installer APK fires the Android's standard installation code for the second APK, but there are all sorts of issues that these kinds of installation mechanisms brings to the table; the main one being security.

    Now you have two APK's that must be tested and signed by the developer and OUYA as well as the interactions between them:

     - How do you access the second APK, (it must be programatically accessed as having the user manually install a second APK is ludicrous), which means OUYA allowing APK's the ability to reference/download/install other APK's, (see any potential holes in this mechanism?).

    - Where does the second APK go, private area, SD, external?

    - Who has access rights to the second APK?

    I could go on and on and I already have, there are so many potential issues I would be surprised if the OUYA devs have even considered this a possibility let alone realistically considered it as a workable solution.

    In the end you have one of two choices:

    1) Embed all your resources and assets within the APK which is completely re-downloaded for each new update.

    2) Code your own external assets handler that references the assets at install time on an external hosting service. This really is not that hard and it is ridiculously cheap, it's about $100 per month for every 1000 Gigabytes of your external data downloaded per month, (here's an Amazon S3 pricing calculator, click on the Amazon S3 option http://calculator.s3.amazonaws.com/calc5.html as an example).
    Post edited by Shush on
  • bobbyjohnson82bobbyjohnson82 Posts: 38Member
    When I was a child and I would start talking to adults about things I didn't know about my dad would say, "stay out of grown folks business". I ain't your dad but you get the point. I know right now that your trying to sound real intelligent and I see you even edited your post to try and sound more so.

        First thing if you don't like the idea go ahead and pay 100 bucks a month and get a 1000gb of data that's fine with me. That would be the end of it but I see I confused you. I never suggested that he/she should build an app that installs another app. What I suggested is that he should build two apps the first with the game the second with assets that would be moved to the /sdcard/android/data/whatever.
     The first apk would be functional but would be missing levels, customization or whatever. Once the user decides that he/she likes the game they can download the other apk or just play the game without it (whatever floats their boat). So the assets apk never needs to be retested or resigned and can be uninstalled unless it has something for further use which can be accessed by another apk using signature verification. That's part of android and every major phone maker uses it to access different resources in their apps ( don't believe me look in /system/framework/com.htc.framework.apk).

    Let me state something again but in a different way. I literally buy a new android game every week (this week I bought two because I heard it would work on the ouya) I hate when  i buy a game and instead of being able to play it right away I gotta wait 20 to 30 minutes for the 1gb or more of game data to download. Then on top of that it's for a game I'm gonna uninstall. Yes that's the extreme instance but it has happened.  Your customers aren't dumb and would probably appreciate if you didn't treat them as such . A dialog such as, "hey I wanted to let you test the game before you spend 30 minutes downloading to find out it's not for you". You see I just gave them a choice. People like choices and not every one is dumb.
         Ouya is about innovation I'm sure they would like this idea until they get the situation under wraps they got alot on their plate right now
      Anyways I just turned this into a novel good luck to you
  • ShushShush Posts: 178Member
    edited August 2013
    lol!

    My edits are usually for spelling/grammatical errors but I think in this particular case it was to add a link. If you like I can add little notes to my edits to ease your paranoia and maybe give that chip on your shoulder a chance to de-inflame?

    I understood exactly what you meant, here ya go I'll try and explain it again for you.

    - First APK = code.

    - Second APK = assets.

    - First APK has to progammatically install second APK.

    - Both APK's have to be signed and tested by both developer and OUYA, even if they contain nothing. (It's part of the APK ideology). Oops sorry here's a link http://en.wikipedia.org/wiki/Ideology

    I think I'll give it a rest, all I was trying to do was offer help through my own experience and opinion, that fact that you're somehow personally attached to your idea and that I offended you by attacking it, well all I can do is chuckle.

    Good luck with your novel champ.

    *edit* Added the missing word "the" to line 16, word 4.
    Post edited by Shush on
  • Killa_MaakiKilla_Maaki Posts: 504Member
    Shush said:
    lol!

    My edits are usually for spelling/grammatical errors but I think in this particular case it was to add a link. If you like I can add little notes to my edits to ease your paranoia and maybe give that chip on your shoulder a chance to de-inflame?

    I understood exactly what you meant, here ya go I'll try and explain it again for you.

    - First APK = code.

    - Second APK = assets.

    - First APK has to progammatically install second APK.

    - Both APK's have to be signed and tested by both developer and OUYA, even if they contain nothing. (It's part of the APK ideology). Oops sorry here's a link http://en.wikipedia.org/wiki/Ideology

    I think I'll give it a rest, all I was trying to do was offer help through my own experience and opinion, that fact that you're somehow personally attached to your idea and that I offended you by attacking it, well all I can do is chuckle.

    Good luck with your novel champ.

    *edit* Added the missing word "the" to line 16, word 4.
    Sorry, but why wouldn't you just use an OBB?
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • KonajuGamesKonajuGames Posts: 560Member
    edited August 2013
    The OUYA Store is simply not setup to handle that case.  Each APK exists on its own and is certified to meet submission requirements on its own.  Each APK appears in the Store once it has been certified and is published.  An assets-only APK won't meet the submission requirements.

    Telling someone they are a child and to stay out of things they don't know anything about is just plain rude on a developer's forum.  @Shush has demonstrated that he knows what he is talking about.  Just because it doesn't agree with what you're saying doesn't make him any less of a developer.  Buying a new game every week doesn't make you any more knowledgeable about the implementation of these.  We have received many job applications for QA testers that state they should get the job because they play games all the time.  Those applications usually go to the bottom of the pile.  It's not the size of it.  It's what you do with it that counts.
    Post edited by KonajuGames on
  • ShushShush Posts: 178Member
    edited August 2013
    Sorry, but why wouldn't you just use an OBB?

    You could, but you would still have to host that OBB somewhere. OUYA are not going to host it as a separate entity to your APK and they are not going to host it in a separate APK, so that leaves you with two options.

    1: Contain it in within your APK, so that it's downloaded and unpacked/decrypted to /sdcard upon installation. (This will take up roughly twice as much room for your assets as they would be stored in your APK and within /sdcard).

    2: Host it on an external server and handle the downloading/unpacking/decrypting yourself either during installation or at a later stage, (e.g. when purchases have been made).

    For my particular development, I'm setting up a system that stores purchasable assets on an external server. This keeps the initial APK installation as small as possible and give me much tighter control over who has access to which assets.
    Post edited by Shush on
  • Killa_MaakiKilla_Maaki Posts: 504Member
    Shush said:
    Sorry, but why wouldn't you just use an OBB?

    You could, but you would still have to host that OBB somewhere. OUYA are not going to host it as a separate entity to your APK and they are not going to host it in a separate APK, so that leaves you with two options.

    1: Contain it in within your APK, so that it's downloaded and unpacked/decrypted to /sdcard upon installation. (This will take up roughly twice as much room for your assets as they would be stored in your APK and within /sdcard).

    2: Host it on an external server and handle the downloading/unpacking/decrypting yourself either during installation or at a later stage, (e.g. when purchases have been made).

    For my particular development, I'm setting up a system that stores purchasable assets on an external server. This keeps the initial APK installation as small as possible and give me much tighter control over who has access to which assets.
    Right, but you'd want to do that with the two-APK setup anyway. So OBB is probably easier.
    That's what I plan on using for games that are big, use the builtin OBB splitter in Unity3D and host the OBB file externally, so the actual installed APK is only the actual game binary, and the OBB stored on the "SD card" contains all game assets (from what I can tell, you can hack OUYA to treat attached thumbdrives as if they were SD cards, which would allow people to save most of the data for my game on their thumbdrive, with only the actual binaries required to be on the OUYA itself)
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • ShushShush Posts: 178Member
    Your plan sounds good, it's very similar to what I have set up, just a few minor differences in implementation details, i.e. I'm using the /data/data/com.mycomany.mygame private area instead of /sdcard.

    I think what we were trying to explain to Bobby is that a two APK system is unworkable for a whole host of reasons and probably some we haven't even though of and that if you do want to separate your assets from your binary, then you have to put in some research, effort and code yourself.
Sign In or Register to comment.