Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

corona sdk application size is too big

I'm using corona sdk of anscamobile for developing my new mobile game. I was using the trial edition and when I build my demo of game, I noticed that the app size is too big. (around 25 mb) but it was just containing 2 song (4 mb) and a few very small pngs. What do you think about the source of this size problem?

Could it be caused by the programming logic, algorithm or something else? like looping something forever, or using lots of glpbal variables etc.. ? Then if you have some opinions, how can I overcome?

thanks.

like image 607
ersentekin Avatar asked Oct 09 '22 19:10

ersentekin


1 Answers

Variables and code take up almost no space. It's more likely to be either images and sounds or maybe Corona's own libraries are quite big.

Which platform is it too big for? If it's the iOS build then you should know there isn't actually a 20MB limit, that's just the maximum to download over 3G, and iOS apps can actually be up to 2GB if you're downloading on Wi-fi.

Also, it's the compressed size (the .ipa) not the application size (the .app) that the limit applies to, so if your .ipa is under 20MB then it's fine. If you only have the .app and you're not sure how to make a .ipa, try zipping the .app and see how big it is. If the zipped size is under 20MB then it will be under 20MB on the app store.

But to work out why it's so big, here's what to do:

  1. if you're starting from the .ipa, rename it to .zip and then unzip it. Inside is a folder called Payload containing the .app.

  2. right-click on the .app and say "show package contents". That will show you all the files inside.

  3. Sort those files by size and try to work out what the biggest ones are. If they are graphics or sound file then you can try to cut them down by using JPEGs instead of PNGs, or using smaller sound formats. If they are code library files (these tend to not have an extension and have a black terminal icon) then there's probably nothing you can do because it is most likely the core Corona library files that are making your app big.

like image 102
Nick Lockwood Avatar answered Oct 12 '22 10:10

Nick Lockwood