cem.tgg
December 25, 2023, 12:34pm
1
Godot Version
Godot v4.2.1
Question
I have created a simple game with Godot for Android but no matter how hard I try I couldn’t optimized its size.
I have used a custom build for exporting with following flags;
tools="no"
deprecated="no"
minizip="no"
xml="no"
builtin_glew="no"
builtin_libmpcdec="no"
disable_3d="yes"
disable_advanced_gui="yes"
builtin_openssl="no"
module_openssl_enabled="no"
builtin_libogg="no"
builtin_libtheora="no"
builtin_libvorbis="no"
builtin_opus="no"
builtin_speex="no"
builtin_squish="no"
builtin_zlib="no"
module_chibi_enabled="no"
module_cscript_enabled="no"
module_dds_enabled="no"
module_etc1_enabled="no"
module_gridmap_enabled="no"
module_ik_enabled="no"
module_jpg_enabled="no"
module_mpc_enabled="no"
module_ogg_enabled="no"
module_opus_enabled="no"
module_pbm_enabled="no"
module_pvr_enabled="no"
module_speex_enabled="no"
module_squish_enabled="no"
module_theora_enabled="no"
module_vorbis_enabled="no"
For thisd build, my APK is 35 MB but when I install the game it goes up to 110MB.
I could accept around something 35MB but 110MB for a simple game is too much. Is there a way to solve this?
Are you using the. NET version?
Are you building the debug or release templates?
Can you attach your Scons command line?
cem.tgg
December 25, 2023, 3:34pm
3
No I am using GDScript,
I tried both debug and release but nothing changed, I have used following commands;
scons platform=android target=template_release arch=arm64
cd platform/android/java
.\gradlew generateGodotTemplates
Just to be sure, what is the size using the standard export templates?
cem.tgg
December 25, 2023, 3:46pm
5
APK size goes up to around 70MB but install size same. Isn’t this ridiculous?
How do you calculate installation size?
cem.tgg
December 25, 2023, 4:03pm
7
Tap on the game on android > app details > storage size: without cache or user data.
I suggest use ONLY ETC2 as texture compression and to deliver only in aab format.
you could also analyze the APK
or Android Studio “Device Explorer” → “/data/data/your-app”
What is the difference to opening with the simple Linux file manager?
If changing texture compression didn’t solve this issue, can I ask you to open a github bug here please?
pudlik
February 10, 2024, 11:33am
12
I’m trying to understand this too. Standard template build is 36mb, Gradle build is 77mb, yet the same size after installing on the device (having only one set of arm64 binaries in the APK). Then AAB is 35mb, but when I use bundletool on it, it becomes 77mb APK again.
Calinou
February 10, 2024, 6:02pm
13
How large are your project’s assets on disk (excluding the .godot folder)?
pudlik
February 10, 2024, 7:55pm
14
The assets are about 9 megs for that given project (resulting in 36mb standard, 77mb gradle build)
In Godot 4 the standard size is about 19mb. If you cut off most modules, you can get a Minimum size about 13mb. (A Blank godot project) installed the you can multiply the apk size x 4.
MP3 files use much space. Better use ogg in this case. Try watch the size of your textures.