Godot: Exported projects are quite large

Created on 28 May 2019  路  9Comments  路  Source: godotengine/godot

Godot version: 3.0.6, 3.1

Exported Godot projects are quite large; a GDscript project is around 30MB. A Godot/C# project is around 42MB. A GDscript Android project is around 33MB; I imagine when Android/C# is a thing, the binaries will be larger.

These project sizes are quite large. Is there any way to shrink them at all?

For Windows, I tend to zip the .exe and pck file, which usually compress well.

archived discussion

Most helpful comment

I had a project that was around 120 mb when exported for android.

I enabled the setting to import all the images with Lossy compression. The quality of the images in the game wasn't reduced at all.

Then, when compiled for Android, the app was 25 mb.

All 9 comments

You can shrink the export size, by compiling your own export templates optimized for size: https://docs.godotengine.org/en/latest/development/compiling/optimizing_for_size.html

For Android, the new template builder probably helps.

Are APKs compressed on Android?
This size comes down to the engine itself and all the features it has.

Compared to Unity I'd say that exported projects are rather small

You can shrink the export size, by compiling your own export templates optimized for size: https://docs.godotengine.org/en/latest/development/compiling/optimizing_for_size.html

For Android, the new template builder probably helps.

Very useful, thanks for sharing the link. Can you post a link for the new template builder? This is the first I've heard of it.

@Zylann APKs are just ZIP archives, so they're compressed.

As for the file sizes themselves, I don't think much can be done about them (except compiling custom export templates with unused features disabled, and exporting one APK per architecture using Google Play's multiple APK support). See this repository for some figures.

Edit: I had a quick look at optimizing APK sizes, and it seems Zopfli compression isn't recommended anymore :slightly_frowning_face:

In previous versions of Godot, or at least with version 1.0 it was possible to compile the engine without some "components", like 3D part of the engine, gamepad support (ex. gamepad=no option), or some audio or gfx formats.
By eliminating things I did not need, I remember I was able to get as low as 7.8 Mb taken by the engine in 2D android app.

Is it possible to build stripped version of the engine with Godot 3.1 and up?

@freemanfromgodotengine This is still possible, as described in Optimizing for size in the documentation :slightly_smiling_face:

It sounds like this is a known problem with a known solution that is well-documented. Since that's the case, I'm going to go ahead and close this. If anyone has any serious issues with this, please let me know and I can re-open it.

Thanks for the good discussion, I learned a lot.

I had a project that was around 120 mb when exported for android.

I enabled the setting to import all the images with Lossy compression. The quality of the images in the game wasn't reduced at all.

Then, when compiled for Android, the app was 25 mb.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ducdetronquito picture ducdetronquito  路  3Comments

EdwardAngeles picture EdwardAngeles  路  3Comments

gonzo191 picture gonzo191  路  3Comments

blurymind picture blurymind  路  3Comments

ndee85 picture ndee85  路  3Comments