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
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.
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.
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
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).
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
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.
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.
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)
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.