• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android My apk increased the size by 50%

Borek

Member
@Ernesto Romero My Android exports all increased in size after 2.3 (might have been 2.3.1 not sure). I filed a ticket with YoYo because I saw a 25+% increase which was consistent from just building with 2.2.4 and 2.3.1
Hello! I got that problem too, so that's why I resigned ( at this time ) from ver. 2.3.3 and using 2.2.4. My .apk was 64MB and now it's 102MB :/ I know, that I can use .aap instead of .apk, but this is not a solution.
Do You got any reply from YoYo? or can You send me a link to Your ticket please? I can't find it on Mantis Bug Tracker. Thank You :)
 
Have you made sure your sound files are compressed? I once had a bloated apk and was told that and true enough it reduces mine significantly.
 

Borek

Member
Have you made sure your sound files are compressed? I once had a bloated apk and was told that and true enough it reduces mine significantly.
Thanks for reply :) Yes, I am 100% sure. I have installed GMS 2.3.3 on my laptop and 2.2.4 on desktop, I just compared all sounds and music ( .ogg ) parameter by parameter, step by step and these exactly the same. From desktop it's 64MB, but from laptop it's 102MB
 

Mool

Member
I guess you updated some extensions? Show me your extension folder. Also show me yor included files folder & architectures you use.
 

Borek

Member
I guess you updated some extensions? Show me your extension folder. Also show me yor included files folder & architectures you use.
It's cloned project 1:1, extensions are the same, all android architectures ( the same used as in 2.2.4 ), no included files. I am almost sure there is another compression method in 2.3.3... or there is just a bug in new GMS.

OK, so the last step to be sure is to make a blank project with 1 sprite, 1 wav and 1 .ogg file and compile it on two GMS versions. I will let You know that is there a difference in .apk size or not :)
 

clee2005

Member
Hello! I got that problem too, so that's why I resigned ( at this time ) from ver. 2.3.3 and using 2.2.4. My .apk was 64MB and now it's 102MB :/ I know, that I can use .aap instead of .apk, but this is not a solution.
Do You got any reply from YoYo? or can You send me a link to Your ticket please? I can't find it on Mantis Bug Tracker. Thank You :)
@Borek I ended up using "gml_pragma("PNGCrush");" at the start of the project and that seemed to fix it. I would have thought it'd be fixed by now, but I guess it is still an issue. I reported it to YoYo and they responded that they had identified that it was the sprites not getting properly compressed and that's why this gml_pragma fixes it (or at least helps - I didn't see a complete return to my previous size, but I had made changes as well so it's hard to tell exactly).

Chris
 

gnysek

Member
Yeah, while testing you don't need to optimize PNG (it's still compressed though), as it only matters for final game size, GPU still decompresses images on load and keeps them as uncompressed 32-bit images in memory, no matter that they are JPG, PNG or something else. PNGCrush is just analyzing file to find better patterns for chunks to compress, or optimizing color pallete if you're not using too many colors, etc. GMS probably doesn't allow it, but with -brute option it would take 148 different crushing methods on every texture file to choose best one :) That's why it takes much more, while there's no difference in image quality, as no data is lost in this operation, it's just better packed.
 

Borek

Member
Yeah, while testing you don't need to optimize PNG (it's still compressed though), as it only matters for final game size, GPU still decompresses images on load and keeps them as uncompressed 32-bit images in memory, no matter that they are JPG, PNG or something else. PNGCrush is just analyzing file to find better patterns for chunks to compress, or optimizing color pallete if you're not using too many colors, etc. GMS probably doesn't allow it, but with -brute option it would take 148 different crushing methods on every texture file to choose best one :) That's why it takes much more, while there's no difference in image quality, as no data is lost in this operation, it's just better packed.
PNGCrush not helped for me, just reduced about 2MB of 100 and I got weird issues after that.
Anyway I found a problem, my .ogg files are originally in MONO (this is also set in the file properties in GMS), while GMS 2.3 converts them to STEREO and thus increases the file size. In the chache directory I checked carefully file by file against GMS 2.2 and 2.3 and only the .ogg files are bigger. In the properties of this file, GMS 2.2 is in mono, and with GMS 2.3 in stereo, although the projects have exactly the same parameters.

So, it's a bug of GMS 2.3
I just reported it to Yoyo
 
Last edited:

gnysek

Member
GMS 2.2 is in mono, and with GMS 2.3 in stereo, although the projects have exactly the same parameters
That's interesting, as I also found a bug with mp3/ogg files, on Ubuntu, if you select that they are "Compressed - streamed", they aren't converted at all ( System.IO.FileNotFoundException: Could not find file xxx.ogg), and game fails to run. So seems that there are bugs with converting sounds according to GMS settings.
 
Top