Unity Community


Page 1 of 2 12 LastLast
Results 1 to 20 of 34

  1. Location
    Chicago
    Posts
    139

    Game size CHECK under 10mb

    Ok, I know this topic has been beat to death but I'm not so worried about getting it under 10 but I really want to know how to check the size of the game before it's on the app store.

    Thanks,
    -Mike Berger


  2. Location
    San Francisco, CA
    Posts
    901
    The size = the size of the app binary (the file that ends in .app) + the rest of the files in the app bundle compressed with zip.


  3. Location
    Alhambra, CA
    Posts
    310
    So the compressed zip should be the final size on the iTunes store? That doesn't seem to be what happened to me - I was at 9.9MB after compressing on my own machine, but on the App Store it shows up as 19.1 MB. I figured that Apple decompresses and then recompresses using a different algorithm, but it was just a guess. Are you saying that your submitted compressed binaries are what's used in the final file size?

  4. Volunteer Moderator
    Posts
    23,706
    Quote Originally Posted by getluky
    So the compressed zip should be the final size on the iTunes store?
    No...

    Size = (size of app binary) + (rest of files compressed with zip)

    --Eric


  5. Posts
    158
    Is there a Unity game out there that's less than 10mb?


  6. Location
    Alhambra, CA
    Posts
    310
    Ah, that makes sense. Thanks!


  7. Location
    Zürich, Switzerland
    Posts
    26,572
    Quote Originally Posted by junkotron
    Is there a Unity game out there that's less than 10mb?
    There are a few with Unity iPhone Advanced

    With basic its impossible


  8. Location
    Austin, TX
    Posts
    95
    My Game Marble Challenge is under 10MB.

    Basically you need to have a 4.6MB zip file to get under 10MB
    Apple adds DRM to your app.
    Anything over 4.6MB zip = over 10MB in app store.
    Dan Wilson
    Founder, Battleknucks Software


  9. Location
    Vienna, Austria
    Posts
    396
    Quote Originally Posted by D22888
    My Game Marble Challenge is under 10MB.

    Basically you need to have a 4.6MB zip file to get under 10MB
    Apple adds DRM to your app.
    Anything over 4.6MB zip = over 10MB in app store.
    That's not quite correct. This varies heavily, depending on coding&content in your app. I was able to release an app that was 6.2Mb after i zipped and sent it to apple. After they put their DRM stuff on it, the download size was just 9.7Mb....
    EditPolyNC (3ds Max2011-2013): Caddyless EPoly recompiles Free DL (The Area)
    PowerPreview (3ds Max): Quality Previews from Nitrous Viewports Free DL (ScriptSpot)


    Josef Wienerroither | 3D & Coding Freelance | Tweak Freak
    3ds Max | Unity Pro | Unity iPhone Pro |
    Unity Android Pro | C++ | C# | AS3
    W7 x64 | Quad Xeon X3350 | 8GB | 275GTX | Mac Mini
    Note: my website is a mess


  10. Location
    Austin, TX
    Posts
    95
    I know apple has been working to improve their process of DRM.
    I haven't complied an app recently, they may have improved it.
    Dan Wilson
    Founder, Battleknucks Software

  11. Volunteer Moderator
    Posts
    23,706
    Quote Originally Posted by D22888
    Basically you need to have a 4.6MB zip file to get under 10MB
    Apple adds DRM to your app.
    Anything over 4.6MB zip = over 10MB in app store.
    Actually no...bliprob, above, already stated the formula for app size.

    --Eric


  12. Location
    San Francisco, CA
    Posts
    901
    Here's an XCode Run Script build phase you can use to automate this:

    Code:  
    1. #!/usr/bin/perl
    2. my $binfile = $ENV{'CODESIGNING_FOLDER_PATH'}.'/'.$ENV{'PRODUCT_NAME'};
    3. my $binSize = -s $binfile;
    4. my $kbsize = $binSize / 1024;
    5. my $mbsize = $kbsize / 1024;
    6.  
    7. print "Binary Size = $mbsize MB ($kbsize KB)\n";
    8.  
    9. $zipResult = `zip -r /tmp/tempAppZip $ENV{'CODESIGNING_FOLDER_PATH'} -x $binfile`;
    10.  
    11. $zipSize = -s "/tmp/tempAppZip.zip";
    12. my $kbsize = $zipSize / 1024;
    13. my $mbsize = $kbsize / 1024;
    14.  
    15. print "Resources size zipped =  $mbsize MB ($kbsize KB)\n";
    16.  
    17. $finalSize = $binSize + $zipSize;
    18. my $kbsize = $finalSize / 1024;
    19. my $mbsize = $kbsize / 1024;
    20.  
    21. print "AppStore size =  $mbsize MB ($kbsize KB)\n";

    In XCode:

    1. Right-click on the "Unity-iPhone" target.
    2. Select "Add -> New Build Phase -> New Run Script Build Phase"
    3. Double-click the new "Run Script" item.
    4. Set the shell to "/usr/bin/perl" and copy & paste the above text. It should look like this:



    5. Build the project, and check the "Build Results" window for the script output.

    For my current project, the results are:

    Binary Size = 19.6145324707031 MB (20085.28125 KB)
    Resources size zipped = 22.6994676589966 MB (23244.2548828125 KB)
    AppStore size = 42.3140001296997 MB (43329.5361328125 KB)
    Oh noes!


  13. Location
    Austin, TX
    Posts
    95
    The zip file you send to apple is all inclusive, the only thing they add is the DRM.

    With Unity the only way to get it under 10MB is with unity Advanced.

    If you build a completely empty unity iphone project with unity iphone basic and xcode the resulting app is 15.1 MB, that is just the size of the engine.

    My game Marble challenge's app is 17.4MB when that file is zipped it is 4.8MB the size of the game on the app store is 9.3MB.
    The downloads on the app store are zip files. Apple adds roughly about 4.5MB of DRM to a unity game.
    My game CRHM is 14.2MB and 4.3MB zipped. App store is 8.8MB
    If you are using iphone advanced you can expect about 4.5MB of DRM added to a game. The DRM has nothing to do with the size of your content, it is just separate code/resources that apple adds before re-zipping the file for resale.

    The app that results in the app store is not an executable, it's a zip file, the iPhone uncompresses it when it gets downloaded.

    The only way to keep the download under 10MB is to keep your zip file under roughly 6MB.
    Dan Wilson
    Founder, Battleknucks Software

  14. Volunteer Moderator
    Posts
    23,706
    Quote Originally Posted by D22888
    The DRM has nothing to do with the size of your content, it is just separate code/resources that apple adds before re-zipping the file for resale.
    This is quite wrong. It's very simple; bliprob already provided a more accurate answer and even made a nice automated way of doing it. Unzip the .ipa file that you download from iTunes and see for yourself. Hint: the actual executable compresses very badly after whatever Apple does to it, but everything else (data, assets, etc.) is the same.

    --Eric


  15. Location
    Austin, TX
    Posts
    95
    The zip file that you upload includes the binary and all the resources.
    That is the complete file there are no other files included.
    The ".app" produced by xcode includes everything.

    There is nothing else to add except DRMat that point
    Dan Wilson
    Founder, Battleknucks Software

  16. Volunteer Moderator
    Posts
    23,706
    Quote Originally Posted by D22888
    The zip file that you upload includes the binary and all the resources.
    Correct.

    There is nothing else to add except DRMat that point
    The only thing that's touched is the executable, which is re-encoded with DRM. There is no "separate code/resources" added. Why don't you just do what I suggest, unzip your .ipa file, and see for yourself? Continuing to argue about something so easily verifiable isn't doing anyone any favors.

    Since the executable doesn't really compress much anymore after Apple touches it, the final size in the app store depends on the size of the executable to begin with. Everything else is identical and compresses as well as it did before. This is why the formula that bliprob originally provided works.

    --Eric


  17. Location
    Austin, TX
    Posts
    95
    I believe we are saying the same thing, my point was that with unity the executable is always the same size and the apple added drm works out to about 4.5 mb

    the original poster asked about getting a unity game under 10mb on the app store.

    As I said I posted different apps at different sizes and all of them had exactly 4.5MB of drm added, the unity executable doesn't change size no matter what content you inclued unless you have advance to stip out uneccessary components.

    So there is a limit to what you can add to keep the app under 10MB, with a unity executable compiled with advanced with maximum optimization you will always get 4.5mb I'd drm
    Dan Wilson
    Founder, Battleknucks Software


  18. Location
    Austin, TX
    Posts
    95
    Oh and I did unzip the IPA, there are several added files outside of the .app as well as 3 new files in the .app, but he executable was unchanged...

    Like I said they add files to the .app and then stick that .app into a folder which goes into another folder with some other files they add and then zip the whole thing
    Dan Wilson
    Founder, Battleknucks Software

  19. Volunteer Moderator
    Posts
    23,706
    Quote Originally Posted by D22888
    I believe we are saying the same thing, my point was that with unity the executable is always the same size
    The executable is not always the same size. It depends on what stripping level you use, and what features you use in your scripts. For example, doing something with System.Text.RegularExpressions will add about 170K to the executable with maximum stripping, and with no stripping it adds 3.7MB. Also it may become larger or smaller in the future depending on what UT does with it.

    Quote Originally Posted by D22888
    Oh and I did unzip the IPA, there are several added files outside of the .app as well as 3 new files in the .app, but he executable was unchanged...
    Those files don't really add anything to the size, and the executable is not unchanged. Try zipping it, and you'll see:



    --Eric


  20. Posts
    154
    I just tried Bliprod's formula and it gave us a small heart attack. It doesn't seem to be all that accurate from what I can tell but there is every chance we are doing something wrong in the calculation.

    To validate I used an app that we already have on the app store to check.

    I took the package generated by Unity, this was 14.5 meg in size.
    I right clicked and 'show package contents' and copied everything in there into a new folder I created.
    I then moved the .app executable file out of that folder which was (8.9 meg)
    I then zipped what was left in that folder using standard OSX zip. (2 meg)

    According to the formula provided, the size would be 8.9 meg + 2 meg = 10.9 meg, however on the app store its listed as 9.7 meg. Thats nearly an entire Megabyte different.

    So, what did I do wrong?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •