Question about Windows exports

Godot Version

4.2

Question

Hello, I’ve been trying to learn Godot and I’m going to master engine operation quite well thanks to the documentation. However, how the export for Windows works is poorly explained and by searching online I couldn’t find any more information. So I come to ask myself the following questions:

  • why when I do my export for Windows, do I only have an .exe file? and all my assets are in the same file and are loaded when the game is launched? I imagine not, so how is this possible?
  • It seems from export, are all gdscripts compiled? From what I understand, everything must be compiled in all exports (web, linux, windows, etc.), so there is no way to create functions specific to Windows exports? Can we make sure that the prints are not compiled either?
    Thanks to read this

The default setup is to create a .exe file which contains an optimized version of the engine and a .pck file which is a bundle that contains all the stuff specific to your project including assets and scripts

You can make functions specific to windows using Feature Tags
If you want to specifically exclude certain files from the exported .pck on certain platforms you can also do that see here

Thanks very much.
Do you know if godot plans in the future to change its export model to be more similar to unity, which does not create a compact version of unity for each game ?

I’m not sure I understand what you mean. The process is already similar to unity, what would be changed?

In what i thinks know, unity only export the used function and system and not all the full engine.

The default export templates exclude everything from the editor, but include all other engine features. However this is already quite small (the non-C# windows 64-bit non-debug export executable for 4.2.1 is 66 megabytes)

You can reduce the size even further as well as any other optimizations by building the export templates yourself, excluding things you don’t need (this page talks about how excluding certain features can help reduce the size Optimizing a build for size — Godot Engine (stable) documentation in English)

Most of the size in a typical game will be from assets like textures and audio though, so the default template is already pretty small.

Oh well,
I’ll take a look
Thank you verry much

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.