Compressing final build files

I was wondering just why the final app file compiled for a device build is so large. I have 200KB of images and using physics, storyboard and game network apis but this seems incredibly large given adding the latter has almost doubled the size.

Am I doing something wrong? [import]uid: 103970 topic_id: 19789 reply_id: 319789[/import]

@mygamingproject let me clear this so your saying that you have small file size for your app but when you do your final build the size of folder doubles is that right how I said it? [import]uid: 17058 topic_id: 19789 reply_id: 76676[/import]

@sebitttas sorry didn’t explain myself. Mine was more that I am adding very little external content approx. 200kb of images yet my file size once compiled is over 20mb. I was trying to target below 10mb to avoid apples wifi rule but don’t see this being possible if using some of these libraries inflates the binary so much [import]uid: 103970 topic_id: 19789 reply_id: 76682[/import]

Apple’s limit is 20mb not 10mb :slight_smile: [import]uid: 84637 topic_id: 19789 reply_id: 76686[/import]

No using binary library does not add up memory also how much was the file size before you compiled because I had an app made and added more memory when I compiled it but once it reached to the AppStore the size reduced [import]uid: 17058 topic_id: 19789 reply_id: 76690[/import]

@Danny it would seem I am a little out of date “At Macworld 2009, Apple issued a software update which automatically allowed 3G and EDGE users to access the store’s full functionality for files smaller than 10 MB.[12] The 3.0 update added the ability to download movies, TV shows, audiobooks, iTunes U, and ringtones on the devices. However, on 18 February 2010, Apple increased the 10MB limit to 20MB.”

@Sebitttas ok I’ll just accept this is just what corona sdk compiles to [import]uid: 103970 topic_id: 19789 reply_id: 76736[/import]

Becareful not to put any files in the same folder that are not a part of the game. For example PSDs. Cuz I think they will just go right in with the build. Correct me if I’m wrong. [import]uid: 99244 topic_id: 19789 reply_id: 76796[/import]

Would it be “packaged” together? Seriously?! o.O
Cheers,
HAPPY NEW YEAR!
Rodrigo. [import]uid: 89165 topic_id: 19789 reply_id: 76819[/import]

tsuriyathep is correct - anything in your project file is going to go in the build.

Peach :slight_smile: [import]uid: 52491 topic_id: 19789 reply_id: 76864[/import]

Hopefully Corona will automatically do this someday but right now my strategy is to create a batch file to make to copies of my source folder one for iOS and one for Android. I then further compress MP3s and JPG quality. PNGs I hand-pick to PNG8 if possible. Remove icons and loading screens that are not for that platform. Then build each iOS and Android source folders. Put design files (PSD,WAV,FLA) in an outside folder so it won’t get in the build. Yes it’s a lot of work.

Happy new year from Las Vegas! [import]uid: 99244 topic_id: 19789 reply_id: 76868[/import]

@Peach, Thank you for the confirmation. BTW it was not good to know but also is very good to be knowing for future projects!

@tsuriyathep, Thank you for the Tip!

Happy 2012!

Cheers,
Rodrigo. [import]uid: 89165 topic_id: 19789 reply_id: 76892[/import]

I know it seems like a lot of work but once you get used to it it really isn’t a problem - it becomes second nature.

When working on a project I always keep two folders on my desktop - “My Project” and “My Project Stuff” - everything that wont be in the final build I put in “My Project Stuff” without even thinking about it any more.

Peach :slight_smile: [import]uid: 52491 topic_id: 19789 reply_id: 76920[/import]

It should be in a MUST-DO list somewhere, or hopefully mentioned in the next Corona book. Because everyone will run into it and I don’t think many people know about it. I have seen a children’s game on the appstore that was a whopping 243MB, and the with content in it, there was no way it should be that big. I’m guessing they made the same mistake. [import]uid: 99244 topic_id: 19789 reply_id: 76925[/import]

Peach, you`re awesome. :slight_smile:

Thank you for the get around idea.
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 19789 reply_id: 76930[/import]

@tsuriyathep - I agree with the idea of mentioning it BIG somewhere for everyone that do not know it as I did right before this topic pass to be knowing as well.

So +1!
Cheers,
Rodrigo. [import]uid: 89165 topic_id: 19789 reply_id: 76931[/import]

Some really helpful advice here but alas things I was already doing.

To take this a little further I started playing around with the builds. My simple app size compiled is 7MB. Adding in ICE for my loading and saving had no effect on the file size ( 7MB ). Adding in Storyboard for my change scene management, again no effect ( 7MB ).

The big hit came when adding the gamenetwork which tripled the size to 20MB. Is the existence of Openfeint really worth the payload?

Additionally, if I were to compile to Xcode Simulator including gamenetwork it reduces to 15.1MB and the others to 4.8MB. How then do you get this 30 to 40% reduction when not going through XCode or is this a more efficient compiler or are things excluded?

Your collective views would be much appreciated as improvements seem to be able to be made with some little bit of tinkering [import]uid: 103970 topic_id: 19789 reply_id: 76974[/import]

13MB? That doesn’t sound right at all - what version of Corona are you using? [import]uid: 52491 topic_id: 19789 reply_id: 76990[/import]

Sorry Peach do you mean the uplift of gamenetwork?

The version I have is the latest stable build I thought having only updated to Indie Developer last week of Version 2011.704 (2011.12.8)

Be interested to know if I have uncovered an issue or doing something incorrectly [import]uid: 103970 topic_id: 19789 reply_id: 76993[/import]

Hey, @mygramingproject, I’ve implemented Openfeint (requiring gamenetwork) for my iOS game using daily build 2011.706, and my device build didn’t get the 13MB increase in size. I didn’t record the change in size upon inclusion of the gamenetwork, but the increase would’ve been nowhere near 13MB. If I had to guess, it would’ve been less than 2MB in increase (and probably no more than 1MB… and, honestly, the increase could’ve been even less than 1MB.)

So… I’m not entirely sure what might’ve caused the increase in size for you, but I doubt it was purely because of the gamenetwork inclusion.

Naomi [import]uid: 67217 topic_id: 19789 reply_id: 77053[/import]

Thanks for that @Naomi but the only line I included to test was

[lua]local gameNetwork = require “gameNetwork”[/lua]

to ensure that it was doing a minimum of including the api and nothing more so I cant see how it could be doing anything else [import]uid: 103970 topic_id: 19789 reply_id: 77054[/import]