Now you’ve created a fully playable game, you might want to share it with friends, family, or anyone so they can enjoy it or offer feedback.
To share your game with someone, you’ll need to pack it into a file that they can run on their computer. They won’t need to launch the Godot game engine to run it like you’ve done while making it.
Creating this easy-to-run file is called exporting. Godot makes it easy to export to lots of different devices. In this guide, we’ll look at exporting to Windows, Linux, and HTML.
We won’t be covering how to export to MacOS, as we unfortunately don’t have a Mac. You need to have a Mac computer to create a working app for MacOS. If you’d like more information, check out the MacOS export guide in the official docs.
We will first look at the export menu and templates. Then, we’ll explain how to export to each target platform.
First, let’s see where we export the game to these devices.
Go to Project -> Export… to bring up the export dialogue. This is where we’ll change the settings for each export.
When you click Add…, you’ll see the devices we can export to.
To start, we’ll go through exporting to Windows. Click Windows Desktop.
Immediately, we have some errors we need to sort out, as shown in the red text.
The errors let us know that we need export templates before exporting the game.
An export template is a copy of Godot pre-compiled for each target platform, optimized, without the editor.
It provides all the engine’s features needed to run the game but is empty. When exporting our game, we inject our code and assets into the template to fill it out and create a working game.
Export templates aren’t included with Godot by default. This keeps Godot a relatively small download size as the export templates are around 500MB.
Download the export templates by clicking Manage Export Templatesor going to Editor -> Manage Export Templates….
Click Download and Install and Godot will download the templates and install them automatically.
With the export templates installed, we can move on to exporting for Windows.
Now we have the export templates, we can go back to the export presets and prepare the game for exporting.
Navigating to Project -> Export… again gets us there.
The errors are no longer there because we’ve downloaded the export templates.
So now, all we have to do is change some settings before exporting our game.
There are plenty of advanced options which aren’t needed to export the game. These options are useful in specific cases which aren’t relevant to us, so for now, scroll down to the application settings.
The most interesting setting is the Icon, which controls the running game’s icon in the taskbar and in the window title bar.
On Windows, you must use a .ico
file to change a
program’s icon. We’ve supplied one that you’ll find in the
godot-final-game-completed/
project. The file is
icon.ico
.
Unfortunately, modifying the application icon is more involved, but there’s further reading in the official docs if you’d like to explore that option.
Click Export Project to export the game as a Windows executable.
If you want to export your game for playtesting, you’ll want to activate the Export With Debug checkbox. It will make the game run along with an output window that’ll show code errors.
If it’s just to share with your family, you can leave this unchecked.
Click Save, and there we go! You’ll find two files in the folder you specified:
.exe
file to run the game..pck
file that holds all the game’s resources,
assets, and sound.Click the .exe
file from a Windows computer to run the
game. You need both files side-by-side to play the game, so be sure to
keep them together when you share your game with others.
On Windows, executables needs to be verified and validated by third-party companies authorized by Microsoft.
Without official certificates, users wanting to run your game will get a blue “Windows protected your PC” screen with a scary text saying the application is insecure.
Acquiring certificates is costly; the cheapest license costs around $100 per year, and it won’t even prevent the warning screen for all users. Luckily, the official Godot app is already certified.
But that certificate will become invalid if you change the executable in any way: changing the application icon would change the executable, and render the certificate invalid.
In other words, if you want to change the application icon, you will need to acquire your own certificates.
In the Export window, click the Add… button and select Linux/X11.
There’s nothing we need to change here, so feel free to export the
project with the default options. Once more, this will produce an
executable file with the extension .x86_x64
and a package
file with your game assets.
Just as on Windows, the player just needs to double-click the executable file from a Linux computer to run the game.
Exporting to HTML5 allows us to play the game in a web browser. This is a great option because you can then technically play the game from any device with a web browser (including MacOS).
There are some drawbacks to playing from the browser, so we still recommend native exports to various platforms if you can.
First, the performance is slower than a native desktop export. Then, the web browser has some technical limitations that limit the graphics you can have there. At GDQuest, we also experienced some issues with the sharpness of text in our app Learn GDScript From Zero.
Still, HTML5 exports can be a nice way for players to test a demo of your game before downloading the desktop version.
The HTML5 export works a bit differently from what we’ve looked at. It’ll create more files, which we can then zip up and upload to a web platform such as itch.io. Then, anyone can play the game in their browser.
Itch.io is a popular platform for publishing indie games. You can upload your games there for free.
To get started, add a new HTML5 preset to your project.
All the settings here are fine to keep as the default, so click Export Project to choose where to save the generated files. We recommend choosing an empty directory as there will be several files.
If you want to upload the game to itch.io, you must name the
.html
file index.html
. Again, disable
Export With Debug.
When you save the export, Godot will generate the files.
If you host your HTML5 game on itch.io, you’ll need to zip up the files before uploading them. On Windows, select all the files, right-click, and send them to a compressed (zipped) folder.
From here, you can follow the HTML guide on itch.io to upload your HTML5 game, so anyone can play it in their browser!
Uploading your HTML5 game every time you want to test changes is time-consuming. But now that we’ve created a HTML5 export preset, a new button appears in the top right of the editor.
This one-click deploy button creates a local server to host the HTML5 game so we can test if the HTML5 game is working as intended.
Click the button, and Godot will run the game in your default browser.
This guide should have given you enough to get your game out there into the hands of others. You can also upload the Windows and Linux versions of your game to itch.io if you want to.