I have made a very simple game in titanium mobile. I only use 90k of sound files, but use quite a lot of graphics, so my .apk file is about 2.5MB. I am guessing most of this comes from the graphics files. I have a couple of specific questions.
-
Does the size of graphics files that are not used get added to final package?
(I am guessing yes, because compiler can not execute dynamic javascript to figure out if file could ever be needed) -
Does the size of graphics files in the Resources/iphone folder affect the size of the android package (and visa versa)
-
Are the packages bigger on average than using native code alone? If so, by how much?
-
What else can I do to reduce the package size?
-
What method of compressing images is most successful on android phone?
-
What size for a file do people consider normal? (when should I stop trying to optimise?)
So basically, how do I measure and reduce the size of the components and final deliverable package?
To answer questions 1, 2, 4 & 6:
1) Yes – unused graphics are added to the final package.
2) No – the Resources/iphone graphics are not included.
You can see the intermediate (pre-apk) by looking at
build/android/bin/assets/Resourcesto see what is being compiled into your binary.4) You could try minifying the JS files.
6) IMO 2.5MB is pretty small