2D Toolkit Forum

2D Toolkit => Support => Topic started by: madclouds on September 04, 2015, 05:15:22 pm

Title: Build & Install App Size Optimization
Post by: madclouds on September 04, 2015, 05:15:22 pm
Hello 2DTK!

I'm getting close to releasing a major update to my game that includes to conversion to using 2DTK.  I have some questions I was hoping you could answer.

For reference, my app's build and install sizes:
    Over the air install size = 125mb
    Installed on device = 749mb

From the unity editor build log:
    @1x = Textures      268.3 mb    97.3%
    @2x = Textures      604.3 mb    98.8%


As always, thanks for the support!

Erik
Title: Re: Build & Install App Size Optimization
Post by: unikronsoftware on September 09, 2015, 03:38:45 pm
App store compresses apps using zip. So the overall app size = zipped file size. The textures I suspect are uncompressed, and these will zip up quite nicely. However, this means that once the app is installed and unzipped it uses up the full size.

PNG textures in tk2d will work around this issue, but at the cost of load times.

Source assets don't get included in the build unless you're referencing them somewhere, should be able to verify this in the editor build.
Title: Re: Build & Install App Size Optimization
Post by: madclouds on September 10, 2015, 10:47:10 pm
Thanks for the input!

So I'm getting ready to release and my ipa size right now is 107.9mb.  I really want to shrink it by 8mb to get under the 100mb over-the-air size limit restriction.

I've gone through all my sprite collections and turned on Reduced 16 Bit compression, which has helped a lot but is there anything else I can do to squeeze out 8 more mb from the ipa?  Good to know that the png atlas format would reduce the size at the cost of load times.  Any other suggestions?

Here's a list of my most expensive assets if it helps:
32.0 mb    27.4% Assets/Sprite Collections/Island Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Safari Data/Safari@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Neighborhood Data/Neighborhood@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Jungle Data/Jungle@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Jungle 2 Data/Jungle 2@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Forest Data/Forest@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Beach Data/Beach@1x Data/atlas0.png
 8.0 mb    6.8% Assets/Sprite Collections/Arctic Data/Arctic@1x Data/atlas0.png
 4.0 mb    3.4% Assets/Sprite Collections/UI Data/UI@1x Data/atlas0.png
 4.0 mb    3.4% Assets/Sprite Collections/Desert Data/Desert@1x Data/atlas0.png
 1.8 mb    1.6% Assets/Sprites/Comics/comic-cell-1_end-cell-safari.png
 1.8 mb    1.6% Assets/Sprites/Comics/comic-cell-1_end-cell.png
 1.5 mb    1.3% Assets/Sprites/Shop/shop_column.png
 705.2 kb    0.6% Assets/Sprites/UI/settings.png
 678.6 kb    0.6% Assets/Sprites/UI/island_cloud-1.png
 623.7 kb    0.5% Assets/Sprite Collections/Island Data/Island.prefab
 573.7 kb    0.5% Assets/Sprites/Shop/shop_shop-sign.png
 512.6 kb    0.4% Assets/Sprites/UI/ui_ui-sprite-sheet-big-arrow.png
 487.4 kb    0.4% Assets/Sprites/Shop/shop_island-btn-1.png
 485.7 kb    0.4% Assets/Sprites/Shop/shop_island-btn-2.png
 416.5 kb    0.3% Assets/Sprites/Menu/menu-2_palm 1.png
 355.6 kb    0.3% Assets/Sprites/Ambulance/@1x/ambulance-02.png
 349.4 kb    0.3% Assets/Sprites/UI/island_vet-island-logo.png
 286.3 kb    0.2% Assets/Sprites/Menu/menu-2_play-btn.png
 286.2 kb    0.2% Assets/Sprites/Menu/menu-2_tree-leaves.png



Thanks!
Title: Re: Build & Install App Size Optimization
Post by: unikronsoftware on September 10, 2015, 10:54:11 pm
No idea how you can squeeze 8mb, but one thing to remember is that its 8mb compressed not uncompressed.... That will work out considerably more, based on your stats, about 6x... so you'll have to actually save 48MB...