Unity Community


Page 2 of 2 FirstFirst 12
Results 21 to 34 of 34

  1. Location
    San Francisco, CA
    Posts
    901
    tractiongames: not sure what might be wrong there.

    Make sure you're not checking the built size of the Debug configuration, since that typically is larger.

    If you are using Snow Leopard, remember that it now calculates file size with units where 1 MB = 1,000,000 bytes, instead of 1,048,576 bytes. You should do "Get Info" and get the actual number of bytes, rather than relying on the abbreviated value in the Finder window listing. Granted, this would make your app look *bigger* in the Finder, not smaller, but it's worth remembering.

    Also, this method provides a worst-case number. The assumption about the binary size is based on the idea that an encrypted binary can't be compressed at all, but in the real world I'm sure it can be compressed *some*. A better method would be to actually encrypt the binary and then zip it with the resources. I'll look into that.

    My games tend to be so far above the 10 MB line (and anyway I've been convinced by those who say don't worry about the 10 MB barrier) so I made this script mostly as a novelty. But I'd like to make it accurate, so please let me know what you find.


  2. Posts
    154
    Will do bliprob. FYI - Not using snow leapord.

    I suspect what Eric5h5 just posted a few comments before this one confirms why there is a little bit of a discrepancy. In his Realmaze3D example, a 9.5 binary compressed to 8.2 meg after DRM had been applied. Yes that is far bigger than the 3 meg compressed he got before apple had their wicked way with the file but still represents a 1.3 meg drop in size which would in our case be more than enough to get the filesize under 10 meg.

    Thank you very much for this information as it has already helped us to pick up almost 2 meg in binary size reduction. Be it silly or not, we had our level maps being stored in code (its a tile engine game so we have many large 2D arrays of integers for the level definitions required). After reading how the DRM additions by apple renders the bin file almost un-compressible, we have moved these in-code definitions into text files within the resources folder and the binary file size has dropped 2.5 meg! As you would expect, these text files in the resources folder are compressing very nicely with the .zip processing.

    Still it's going to be very tight going. We have the build size down to 1.6 meg for resources / other files zipped and binary at 8.9 meg totalling 10.5 meg. So if the bin after DRM comes down by as little as 500k we are looking good.

    (Although it would seem it is completely irrelevant, pre-DRM the bin file is dropping from 8.9 meg to 2.8 meg after zip at this end)

    Will let you know once we have submitted what the end result is and thanks again for your help. What would be interesting to find out is how other people's binary files when extracted from the iTunes IPA files are compressing compared to their original sizes. If we could determine a range of compression factors we could greatly improve your prediction formula. (i.e. do most the bin files reduce similar percentage as the Realmaze3D example post DRM or is that ratio quite variable.)


  3. Posts
    154
    OK, Just grabbed the IPA version of one of our small apps on the App store to see how these theories are stacking up when applied in reverse.

    First point of interest, within the IPA there is a binary called ITunesArtwork which is 104 kb (when compressed it was 100k), im assuming this is the 512x512 resized icon that itunes can display in a non-editable binary format? So right away we have a 100k odd boost in size.

    I then tested the application binary compression:

    Before APPLE / DRM : 8.6 meg -> 2.8 meg
    After APPLE / DRM : 8.6 meg -> 7.3 meg

    The final IPA / ZIP download size from iTunes was 8.9 meg, the .zip file we submitted was 4.2 meg.

    There was a compressed gain of 4.5 meg in the app binary and a compressed gain of 100k in the addition of the ItunesArtwork which pretty much equates to the 4.2 meg we submitted + 4.5 + 0.1 = 8.9 meg download size (allowing for 100k sundries of partial MB in each rounded number used in formula)

    What i find REALLY interesting however is that the compression on the bin file after DRM / iTunes was EXACTLY the same as the Realmaze3D example (even tho the original bin file was 0.9 meg smaller.

    Realmaze3D: 9.5 meg -> 8.2 meg (1.3 meg reduction)
    Our Application: 8.6 meg -> 7.3 meg (1.3 meg reduction)

    Maybe your formula needs to account for a 1.3 meg reduction in the .exe (instead of 0 reduction) as well as adding another 100k for the ItunesArtwork and it will be getting very close to the money shot?

    Definately keen to hear more examples on how the bin file within the IPA compresses to see if this 1.3 meg value is reliable or just a co-incidence.

    EDIT - Just tried one of our larger apps, and yet again the reduction was 1.3 meg

    Before DRM / Itunes: 8.9 meg - > 2.8 meg
    After DRM / Itunes: 8.9 meg -> 7.6 meg - (1.3 meg reduction)

  4. Volunteer Moderator
    Posts
    23,745
    Well, 1.6 did change things in this department. With 1.5, the binary for Realmaze3D was 9.5MB, which compressed to 3MB before DRM and 8.2MB after DRM. Now it's 7.4MB, which compresses to 2.7MB before DRM and 7.2MB after DRM (i.e., hardly at all).

    So, with the small amount extra that's added, I think the "Size of binary uncompressed + rest of stuff compressed" rule is quite accurate now.

    --Eric


  5. Location
    Indianapolis, USA
    Posts
    1,115
    Do you guys know that the 10MB limit was recently changed? Now it is a 20MB limit.
    http://www.AppHands.com
    Available for contract iOS development (Objective-C and/or Unity3D)

    "Our life is frittered away by detail... simplify, simplify."
    -Henry David Thoreau

  6. Volunteer Moderator
    Posts
    23,745
    Yep, I knew that. In my case, once the limit was raised and my game was under it, the effect was exactly zero...sales didn't go up or down any noticeable amount. So as far as I'm concerned this discussion is entirely academic, but still kind of interesting.

    --Eric


  7. Location
    Munich
    Posts
    67
    Like said before the App size is now at 20mb. To archive this you should try to get your zipped app to 10mb. We made the experience that the DRM nearly doubles your App-size. That sucks hard because it takes about 5 minutes to remove the DRM of the app and makes it sensless.

    And it was possible to get an App under 10mb with Unity but you have to plan carefully what and who many textures you can use and how u can compress them. And sounds are also a pain in the ass because the iPhone can play just on mp3.
    We have to remove most of the game sounds to archive the <10mb size for our Memory game we made.
    Even now it is hard if u want good art and sounds in your game and hit the 20mb.

  8. Volunteer Moderator
    Posts
    23,745
    Quote Originally Posted by RenoRosco
    To archive this you should try to get your zipped app to 10mb.
    No...as discussed above, it's "size of binary uncompressed, plus rest of stuff compressed".

    Even now it is hard if u want good art and sounds in your game and hit the 20mb.
    It's not that hard, assuming you don't have a massive amount of content. It's easier with Pro, and Unity iPhone 1.6 chopped off 1MB from the distribution size compared to 1.5, so Realmaze3D is now 16.3MB on the store instead of 17.3MB. This has a couple of music tracks, dozens of sound effects, and half a dozen large texture atlases (1024x1024 and 512x512), plus a number of miscellaneous smaller textures.

    --Eric


  9. Location
    Indianapolis, USA
    Posts
    1,115
    Everything I have on the App Store is between 10 and 20 megs. I had tried hard to get them under 10MB but could never do it. Hitting the new 20MB limit won't be too hard.
    http://www.AppHands.com
    Available for contract iOS development (Objective-C and/or Unity3D)

    "Our life is frittered away by detail... simplify, simplify."
    -Henry David Thoreau


  10. Location
    Zürich, Switzerland
    Posts
    26,572
    The DRM impact is pretty easily calculatable:

    Your final size on the store is the size of the application in the package uncompressed + the rest of the app folder compressed


  11. Posts
    154
    Id just like to add, our game 'Pro Surfing' which weighed in at a hefty 18 meg has gone gangbusters here in Australia since apple lifted the download limit. We instantly shot into 11th in sports (from down near 30) and up to 72nd in Top 100 games, and have maintained these rankings ever since, all purely because our app can now be downloaded over the air. Blew us away!

    Makes me wonder how many people have gone to grab the game in the past and bailed on the idea after realising it required iTunes synch or Wi-fi.

    On the down side, it has also affected our latest project which is about 1 month out from release, we had been battling like maniacs to keep it under 10 meg, and now its all wasted effort. We were super happy with the amount we were achieving with the 10 meg limitation (which is in essence a game of only a couple megs in size on top of the unity base) but now we will have to up the ante on the production value to keep in line with user expectations.

    I think overall, the 20 meg limit will only hurt the little men, ppl who in the past had not even considered looking at big budget titles due to the over-the-air denial and would always go for the little home-brew games are now going to expect more from their OTA downloaded apps.

    Of course for unity developers, its a godsend and opens up the market where before it was practically impossible to get at these OTA downloaders.


  12. Location
    SF Bay Area, CA
    Posts
    100

    bump

    **bump**

    I tried the xcode script but couldn't find the info it was supposed to list? Is it broken?

    I'd be eternally grateful if someone could please elaborate on the specifics of how to determine the size of a pre-submitted app as it will show up as on the app store. My reasons is I'd like to stay under the 20meg 3G limit, if possible, and I need to know how much space to allow for art and SFX.

    Thanks!
    Goody!


  13. Location
    Chicoutimi, QC
    Posts
    31
    I made a perl script i'd like to share.

    It is used this way:
    theScript.pl --execname=MyAppExecName /SomePath/*.app

    It will print the file names with their respective file sizes in bytes and also in MB.

    Code:  
    1. #!/usr/bin/perl
    2. use strict;
    3. use File::stat;
    4. use Getopt::Long;
    5.  
    6. sub CalculateBuildSize
    7. {   
    8.     my $executableName = $_[1];
    9.     my $app = $_[0];
    10.    
    11.     my $appCP = "Tmp.app";
    12.     print `cp -R $app/ $appCP`;
    13.     print `mv $appCP/$executableName TmpExec`;
    14.     #print `ditto -ck --sequesterRsrc --keepParent $appCP $appCP.zip`; #Alternate compression method, compress slightly more than zip
    15.     `zip -r $appCP.zip $appCP`;
    16.     my $execsize = stat("TmpExec")->size; #A
    17.     my $archiveSize = stat($appCP.".zip")->size; #B
    18.     my $drmSize = 100*1024; #C
    19.    
    20.     print `rm $appCP.zip`;
    21.     print `rm TmpExec`;
    22.     print `rm -r $appCP`;
    23.    
    24.     my $totalSize = $execsize + $archiveSize + $drmSize; #A + B + C = maximum size of your App after approval
    25.     my $totalSizeMb = sprintf("%.2f", $totalSize/1024/1024);
    26.    
    27.     print $app . ": ". $totalSize . " bytes (" . $totalSizeMb ." MB)\n"
    28. }
    29.  
    30. my $execname ="";
    31. my $result = GetOptions ("execname=s" => \$execname);  
    32.  
    33. if ( $execname )
    34. {
    35.     foreach (@ARGV) {
    36.         CalculateBuildSize($_,$execname);
    37.     }
    38. }
    39. else
    40. {
    41.     print "Executable name was not specified, please use --execname=MyAppExecName\n";
    42. }


    Source: http://answers.unity3d.com/questions...pp-size-please

    I am wondering if anyone got an application with a file size higher than this calculated maximum size in the app store. Ever heard about such a situation?


  14. Location
    San Francisco CA USA
    Posts
    63
    Our 16mb ipa file ended up being a 35mb download .
    Can someone tell me how much download size we can hope to save with a Unity Pro iOS license? Of course I guess it depends, but does anyone have some data points they can share?

Page 2 of 2 FirstFirst 12

Posting Permissions

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