Long story short, I do 2D, I don’t need 3D, I like small files.
So I found these:
https://medium.com/@nikhil2003verma/how-i-reduced-godot-game-size-from-250mb-to-23mb-for-android-8858e7287d8e
And…I’m still confused.
My question is, to reduce the build size of my project, which part am I getting the custom build?
Is it the Godot Engine itself needs to be custom build, or just a modified export template, or the combination of 2?
And whatever the case might be, are there pre-built solution by someone? Like, some “2D only Godot Engine” on github or something?
Thanks for reading.
Yes, there are two parts to the engine, building the editor which you may be familiar with, and building the runtime templates. The latter is a slightly smaller executable that runs PCK and zip files of compressed godot project files, creating packs is largely what the “Export” menu does, then a runtime template is copied into the exported directory.
You can build your own runtime template from the Godot source code using scons target=template_release, and if the template is copied into the correct export_templates folder can be exported through the usual editor dialogue
popcar2 posted on how they minimized their godot build for web specifically, more of a journey blog than a how-to, but I could see this being easier to follow each command and why the options matter.
Worth noting this only affects the runtime’s size, if you have large assets then the assets will still take up a majority of the pack size.
Export Template IS the binary shipped into the build.
I always assumed it’s some kind of compiler binary for the editor to run, but no, it literately just copy and paste the template into the directory that’s expecting a .pck with the same name.
That’s why I was confused if it’s Godot or Export Template needs to change, I thought of them as editor and compiler, but they’re actually the same thing compiled with different parameters. The template IS the engine.
I can finally move on. Thanks for the reply.