+1 vote

Hi.
One thing is bothering me and I hope you can explain it to me plain and simple.
Why final exe must be so damn big? I mean, I toy around with just one scene, one sprite (boss from: https://opengameart.org/content/gameboy-platformer-art.) , no additional coding. I set display to 800x600 and yet my sprite seems to be microscopic but final size of exe is 29. How's that possible. When I change export format to zip/pck then it has 10-12 kb.

I try to aim at 5-10 mb of final size of my project zipped or exe. With gameboy like color palette. Is it possible to achieve that with downloaded not compiled from source godot?

asked Aug 7 in Projects by VanBandama (18 points)

Unfortunately, it'd be very difficult to get the size of your executable down, since as another answerer mentioned, it's the engine itself. The executable will always be the same size for a given platform, no matter how large or small your project is.

3 Answers

+1 vote

Exporting to ZIP/PCK gives you a package of all the data files for your game, but not the Godot engine itself. If you gave someone the ZIP/PCK, they would have to go and download Godot themselves to run it. (If you've ever played old Doom levels, the ZIP/PCK is like a WAD file, while Godot is the program itself.)

The EXE is so large because it's got the whole Godot engine in it. You can make it slightly smaller by toggling off the option to include debugging when you export it, but it doesn't change the size by much. I don't think compiling Godot yourself would change the size of the exported EXE, as that's how it's coded.

Unfortunately I don't think you can make a game in Godot that's smaller than 10 MB.

answered Aug 8 by Kotep (18 points)

The methods mentioned in this article can help to reduce the engine's executable size to around 40% of the normal size.

http://docs.godotengine.org/en/latest/development/compiling/optimizing_for_size.html

+3 votes

In addition to following the advice in Optimizing a build for size, creating a Windows installer that uses a stronger compression algorithm can also help bring down file sizes. It's also possible to use a more optimized (but DEFLATE-compatible) compression algorithm to create slightly smaller ZIP archives.

I've tested this with the Platformer 2D demo, here are the file sizes I got for reference when I exported it to 64-bit Windows in release mode:

  • Uncompressed: 28.3 MB
  • ZIP compressed with zip -9: 12.4 MB
  • ZIP compressed with advzip -4 -i 100: 12.1 MB
  • Inno Setup installer with LZMA compression: 9.0 MB

If you plan on creating an installer using Inno Setup, feel free to use the .iss file I use for my Godot builds as a template.

answered Aug 8 by Calinou (2,428 points)
edited Aug 8 by Calinou
0 votes

Thanks for answer.I Just started my journey with programming so I might sound like purist, 'coz I want my project to be best in every aspect.
Sometimes I forget that better is the enemy of good :)

answered Aug 9 by VanBandama (18 points)

This should be a comment rather than an answer :)

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.