In relation to desktop gaming, Home windows dominates the market. Based on the Steam {hardware} survey, practically 97% of customers are on Home windows. Linux takes second place with round 2% of customers, with the bulk utilizing a Steam Deck. This market distribution highlights the significance of making exports for each Home windows and Linux to succeed in the widest attainable viewers.
Should you’re fascinated with focusing on the Steam Deck particularly, try the tutorial on focusing on the Steam Deck with Godot.
Getting Began
For this tutorial, you possibly can both use your personal undertaking or obtain the pattern undertaking to comply with alongside.
If you wish to use the pattern undertaking, obtain the starter supplies zip from the hyperlink on the high or backside of this tutorial and extract it. Subsequent, open Godot and import the starter undertaking. The undertaking is a small 2D shoot-em-up recreation referred to as Aerixa.
Go forward and run the undertaking if you wish to take a look at it.
What’s Exporting?
In Godot, exporting a undertaking is the method of packaging your undertaking together with a binary that comprises the Godot engine code. The binary is compiled in a different way for every goal platform, permitting your undertaking to run on methods that don’t have Godot put in.
Each supported platform has its personal export template, which is a group of information Godot makes use of to bundle and debug your exported undertaking. They’re important as a result of they include the Godot engine code compiled for every goal platform, permitting your undertaking to run on methods that don’t have Godot put in.
With the binaries in hand, you possibly can then distribute your undertaking on platforms like Steam, itch.io, the App Retailer and Google Play.
Getting the Export Templates
If that is the primary time you’re exporting for the model of Godot you’re utilizing, you’ll have to obtain and set up the export templates.
You may test if in case you have the templates put in by deciding on Editor ▸ Handle Export Templates within the high menu.
This can open the Export Template Supervisor, a small instrument to handle your export templates.
On the high left, you possibly can see the model of Godot you’re utilizing; 4.3.secure in my case.
In case you don’t have the export templates put in but, you’ll see a purple textual content seem subsequent the model as is the case within the screenshot above. To put in the lacking templates, click on the Obtain and Set up button on the high proper.
Doing so will obtain the templates for the model of Godot you’re utilizing and set up them regionally.
As soon as the obtain finishes, you possibly can see the place Godot put in your new export templates.
Notice: When you have export templates put in within the Different Put in Variations part for a model of Godot you’re not planning on utilizing anymore, click on the garbage can icon subsequent to the model identify to delete them and recuperate some disk house.
With the templates put in, now you can export your undertaking!
I like to recommend going by the all sections under even if you happen to’re solely fascinated with exporting for Home windows as they include common details about the export course of that I’ll reference to later.
Including an Export Preset
Exporting initiatives is simple, however understanding the small print of the method helps you make knowledgeable selections about your export settings.
To start out off, open the Export window by deciding on Mission ▸ Export within the high menu.
The Export window will likely be nearly empty at this level.
So as to add a Linux export, click on the Add… button on the high and select Linux.
This can add a brand new Linux entry within the Presets listing and permits the choices on the correct facet of the window.
Export Settings
Time to take a better take a look at the varied settings Godot presents you with for exports.
Shared Choices
First up are the shared choices on the high, this consists of the Identify and Export Path fields. These are the identical for all platforms.
From high to backside, the choices are as follows:
- Identify: A reputation to your export preset. That is helpful as you possibly can configure totally different presets for a similar platform, so the totally different names make it simpler to differentiate between them.
- Superior Choices: For some platforms like Android and iOS, additional choices can be found. Toggling this on will present choices meant for energy customers.
- Runnable: If checked, this can allow one-click deploy for the export preset, enabling you to shortly deploy the preset through a single button click on. The precise perform of one-click deploy will depend on the platform. For desktop platforms like Linux, macOS and Home windows, it lets you deploy exports over SSH as soon as configured. For cellular platforms like Android and iOS, it lets you set up the export in your machine or emulator. Lastly, for net exports, it would begin a neighborhood net server and host the exported undertaking. For extra data on one-click deploy, see Godot’s One-click deploy documentation.
- Export Path: The file path the place the undertaking will likely be exported to.
Choices Tab
Subsequent, check out the Choices tab.
Once more, from high to backside, the choices are as follows:
- Customized Template: Right here you possibly can set a path to customized export templates for each the Debug and Launch exports. Should you compiled your personal export templates from the engine supply code, you possibly can set them right here. This can be utilized to optimize your exports for dimension or velocity by stripping out the 3D engine for instance.
- Export Console Wrapper: When enabled, an additional executable will likely be included subsequent to the exported undertaking that may run your undertaking within the console. That is helpful for debugging and testing your undertaking.
- Embed PCK: A PCK file is an archive file just like a ZIP. It bundles the undertaking’s belongings like scripts, scenes and textures collectively in a single file. If allow this setting, the PCK file will likely be embedded within the exported undertaking as a substitute of being a separate file.
- Structure: This units the CPU structure of the exported undertaking. On desktop platforms, the most typical CPU structure is x86_64, which is the 64-bit model of x86. I like to recommend leaving this on the default worth. The export templates that Godot supplies solely assist the x86_32 and x86_64 architectures. If it’s good to export for a special structure, you’ll have to construct your personal export template. Yow will discover extra information on that on the Constructing from supply web page.
- Texture Format: With these, you possibly can select how textures are saved. Each choices right here mix two texture codecs into one. The S3TC and BPTC codecs are primarily used for desktop platforms and consoles, whereas ETC2 and ASTC are used for cellular platforms, embedded gadgets and the net.
- SSH Distant Deploy: This selection lets you deploy your exported undertaking over SSH. This may be helpful to check your undertaking on a distant machine.
For many initiatives, you possibly can go away these at their default values, however I hope you’ll agree it’s helpful to know what you should use these choices for.
Time to try the Assets tab.