Guide to the Godot game engine/Exporting
Have you made an epic game that you want to share with your friends or sell online? You could give away the Godot editor along with your game's files, but that is (a) impractical and (b) allows others to peek into your hard work, and maybe even claim it as their own.
The solution to both of these problems? Exporting.
Getting an export template
[edit | edit source]When you export your game, you export every file in your game to an application file, also known as an executable. But in order to do this, you need an export template. These can be downloaded on Godot's download page. You want them for all platforms you intend to sell your game on. Supported templates are:
- Windows Desktop
- Linux/X11
- Mac OSX
- Html5
- UWP (Universal Windows Platform)
- IOS
- Android
Once downloaded, the templates must be put in your Godot appdata folder in the Godot/templates/<CURRENT VERSION>/ dir. An easy way to do this is go to the "Editor" dropdown menu at the top of the screen and click "Open Editor Data/Settings Folder".
Another way to download them is to go to Editor -> Manage Export Templates... and click "Download" under the "Current Version" section.
You can then create export presets. Go to Project -> Export... and a popup will appear.
Press "Add..." and choose a platform your game will run on. You may choose any value for the settings on the left on the "Options" tab.
Options
[edit | edit source]You should pick a name for "Product name". This should be the name of your game.
If present, "Company Name", "File Version", "File Version" and "File Description" should be set. Sometimes the names are changed based on the platform, most notably hand-held devices.
You can also set an image for your game's icon, shown as the image next to the file's name on your file explorer or on your handheld device's menus.
Android has quite a lot of "permissions". You must enable the ones your game uses, like "Camera" if you use a camera (e.g: for AR) or "Internet" if your game is multiplayer. If in doubt, enable them one at a time, if it doesn't help, disable it and enable the next. Repeat until the game works as expected. (Try not to feel tempted to enable them all, as some players would stop playing the game immediately if they see 500 permission requests for completly unrelated things, such as access to location in a simple game.)
Resources
[edit | edit source]Go on the "Resources" tab, and under the "Filters to export non-resource files/folders", you may use regex patterns. Here are some common examples:
- To allow all files that end in ".json", use
*.json
- To allow all files inside a "docs" folder, use
docs/*
- To allow all files/folders that begin with "doc", use
*/doc*
- To allow a specific file called "versions.txt" inside the main folder, use
versions.txt
The text box below that one is for excluding things that fit the include filters or are normally excluded. For example, to avoid exporting any folder called "exclude_export", use *exclude_export/*
. Uses the same rule as "Filters to export non-resource files/folders".
Both of these "filters" may be comma separated to define more than one pattern.
Features
[edit | edit source]The "features" tab is a list of features that can be checked with OS.has_feature()
. (It doesn't define "release" or "debug" here, that is done automatically based on the options you chose.)
Script
[edit | edit source]Go onto the "Script" tab. The 3 script modes are:
- Text: code is saved as plain text that anybody can read
- Compiled: code is compressed, to be smaller and harder to read
- Encrypted: code is encrypted to become almost impossible to read. Recommended for retail games where the code is not free or open-source, and when you want to prevent cheating.
- Getting started [ ]
- Making it work
- Making it look good
- Advanced help
- Miscellaneous