- What does "exporting" mean?
- Settings to decide before publishing
- Why text turns into boxes in the web version
- Install the export templates
- Create export presets
- Export (from the editor and the command line)
- Check the exported game
- Publish on itch.io
- Steam and other places to publish
- Common pitfalls
- Working with AI
- Series recap, and where to go next
In Lesson 9, we checked the game with a checklist and an automated test. Now for the final touch. In this lesson, we'll export the game as a Windows executable and a web version you can play in the browser, then walk through publishing it on itch.io. After that, friends who don't have Godot can play it just by opening a URL you send them.
Finished project for Lesson 10: project-lesson10.zip (450 KB)
What does "exporting" mean?
The game you run with F5 in the editor only runs because the Godot editor is there. To give it to other people, you export the game into a form that runs without Godot.
An exported game is made of two main parts:
- The game data (
.pck): the scenes, scripts, images, and sounds you made, bundled together. - The export template: the "just run it" part of Godot that runs that data. There's a separate one for each target, such as Windows or the web.
A saved choice of which target to export to, and with which settings, is called a preset. In this lesson, we'll create two presets: "Windows Desktop" and "Web."
Settings to decide before publishing
Before exporting, check the following items on the General tab of Project → Project Settings... (if you can't find an item, turn on Advanced Settings in the top right and it will appear).
| Item | Value in this series | Meaning |
|---|---|---|
| Application → Config → Name | Hop Hop Coins | The game's name. It appears in the window title and the browser tab |
| Application → Config → Version | 1.0.0 | The game's version. If you bump it to 1.0.1, 1.1.0, and so on every time you fix something and release again, you can tell which version a problem happened in |
| Application → Config → Icon | res://icon.svg | The game's icon. In the web version, it's also the icon on the browser tab |
| Display → Window → Size | 1152 × 648 (unchanged) | The size of the game screen. We've been placing everything based on this |
| Display → Window → Stretch → Mode | canvas_items | When the window size changes, scale the whole screen up or down |
| Display → Window → Stretch → Aspect | keep (unchanged) | Keep the width-to-height ratio and fill any leftover space with black bars |
The most important one is Stretch → Mode. If you leave it at the default disabled, making the window bigger doesn't make the picture bigger; you just get empty space around it. In the web version, which you play in a browser, the screen size changes to fit the page, so setting it to canvas_items lets the game look the same at any size.
One more thing: remember that when we created the project in Lesson 1, we set the renderer to Compatibility. The Compatibility renderer is a way of drawing that works on older computers and in browsers too. For a game you want to release on the web, choosing it from the start is the safe bet.
These settings are saved in project.godot like this:
[application]
config/name="Hop Hop Coins"
config/version="1.0.0"
run/main_scene="res://title.tscn"
config/features=PackedStringArray("4.6", "GL Compatibility")
config/icon="res://icon.svg"
[autoload]
GameState="*res://game_state.gd"
[display]
window/stretch/mode="canvas_items"
[gui]
theme/custom_font="res://fonts/NotoSansJP-Game.ttf"The [gui] line at the end is the font setting we'll add in the next section.
Why text turns into boxes in the web version
While writing this lesson, we first exported the web version of the game's original Japanese edition without adding any settings. Here's what happened:
Japanese text that was readable in the editor and in the Windows version has all turned into boxes. The same thing can happen to any text, in any language. Here's why:
- A web build runs inside the browser and can't use the fonts installed on the player's computer. It can only draw characters that are in the fonts the game itself carries.
- On Windows and macOS, Godot quietly fills in missing characters from the computer's own fonts. That's why you don't notice the problem while testing in the editor.
- Godot's built-in font has no Japanese, Chinese, or Korean characters, so text in those languages always needs a bundled font. For English text, the built-in font usually works fine. Still, bundling a font gives the game the same look everywhere, and it protects you when you add characters later (accented letters, symbols, a translation into another language).
The fix is to put a font that has all your game's characters into the project and make it the default font for the whole game. This series does that too:
- Copy the
fontsfolder (withNotoSansJP-Game.ttfandOFL.txtinside) from the finished Lesson 10 project above, project-lesson10.zip, into your project. - On the General tab of Project → Project Settings..., set GUI → Theme → Custom Font to
NotoSansJP-Game.ttf(you can also drag it in from the FileSystem dock).
Now every label and button is drawn with this font, in the editor, in the Windows version, and in the web version. As in the first screenshot, the text is readable in the web version too.
Any font you bundle with a game and distribute must have a license that allows distribution. Don't take fonts that came with Windows or macOS, like Segoe UI or Arial, and ship them in your game. NotoSansJP-Game.ttf is a small version of Noto Sans JP, which is released under the SIL Open Font License (OFL). It contains only the characters this game uses (Noto Sans JP also covers Latin letters, so it works for the English text). The license text is in OFL.txt, and it's also written inside the font file.
If you change the text yourself and use new characters that aren't in the font, those characters will turn into boxes again. In that case, download a complete OFL font from Google Fonts (for example Noto Sans, or Noto Sans JP if you need Japanese) and use that instead. A complete font is larger (several MB for a Japanese font), and the web version takes a little longer to load to match.
Install the export templates
Next, install the export templates you need for exporting. They're a separate download from Godot itself, and they must be exactly the same version as your Godot (templates for 4.6.2 if your editor is 4.6.2).
- Open Editor → Manage Export Templates... in the menu. The Export Template Manager opens, and Current Version: shows your version of Godot.
- Make sure Download from: is set to "Best available mirror," then click Download and Install. It's around 1 GB, so do this when you have some time.
- When it's done, you'll see "Export templates are installed and ready to be used."
If it doesn't work because of your network, you can also download the "Export templates" (.tpz file) from the download page on Godot's official website and install them with Install from File. On Windows, the templates go into %APPDATA%\Godot\export_templates\4.6.2.stable\. Once installed, you can use them over and over for any project on the same version.
Create export presets
Open Project → Export... in the menu. Create a preset by picking a target from Add... in the top left, and configure it on the right.
Windows Desktop
- Choose Add... → "Windows Desktop."
- Set Export Path to somewhere outside the project folder. In this series we used
../pyonpyon-coin-export/windows/pyonpyon-coin.exe(which makes apyonpyon-coin-exportfolder next to the project; the names come from the game's original Japanese title, so feel free to use your own). - On the Options tab, turn on Binary Format → Embed PCK. The game data goes inside the exe, so the only file you need to hand out is
pyonpyon-coin.exe. - On the Resources tab, make sure Export Mode is set to "Export all resources in the project," and type
tests/*into Filters to exclude files/folders from project. The game doesn't need the tests from Lesson 9, so we keep them out of the files we hand out.
Web
- Choose Add... → "Web" again.
- Set Export Path to
../pyonpyon-coin-export/web/index.html. Keep the file name asindex.html(itch.io opens the file with this name first). - On the Options tab, make sure Variant → Thread Support is off.
- Set HTML → Canvas Resize Policy to
Adaptive(this stretches the game screen to fit the page). - Add
tests/*to the exclude filter on the Resources tab here too.
Turning Thread Support on lets the game run several things at once in the browser, but in exchange, the server hosting the game needs a special setting called "cross-origin isolation" (it's needed to use SharedArrayBuffer). With it off, the game works just by uploading it to an ordinary web server or itch.io. For a 2D game of this size, turning it off doesn't change how the game runs.
There's also a reason we put the output outside the project. Exporting the web version creates several .png files for icons. If you export inside the project, Godot imports them as game images, and they get mixed into the next export. Exporting outside the project avoids that worry.
Presets are saved in the project's export_presets.cfg. Here are the important lines from the finished project's file (when you save from the editor, there are many more lines):
[preset.0]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
export_filter="all_resources"
exclude_filter="tests/*"
export_path="../pyonpyon-coin-export/windows/pyonpyon-coin.exe"
[preset.0.options]
binary_format/embed_pck=true
[preset.1]
name="Web"
platform="Web"
runnable=true
export_filter="all_resources"
exclude_filter="tests/*"
export_path="../pyonpyon-coin-export/web/index.html"
[preset.1.options]
variant/thread_support=false
vram_texture_compression/for_desktop=true
html/canvas_resize_policy=2export_presets.cfg can also contain settings where you type things like passwords (code signing, for example). If you publish your project on GitHub or a similar site, check its contents before uploading.
Export (from the editor and the command line)
From the editor
- In the export window, select the preset you want to export (for example, Web).
- Click Export Project... at the bottom.
- In the save dialog, uncheck Export With Debug before saving. A debug export is for checking things during development: it makes errors easier to investigate, at the cost of being a little heavier. What you hand out to people should be the non-debug (release) version.
Click Export All... to export every preset at once.
From the command line
Just like the test in Lesson 9, you can also run Godot from the command line to export. The web and Windows versions for this series were actually exported this way. First create the output folders (pyonpyon-coin-export\web and pyonpyon-coin-export\windows), then run the commands in the project folder.
C:\Godot\Godot_v4.6.2-stable_win64_console.exe --headless --path . --export-release "Web"
C:\Godot\Godot_v4.6.2-stable_win64_console.exe --headless --path . --export-release "Windows Desktop"--headless means "run without opening a window," and the name after --export-release is the preset name. Since it exports with the same settings every time, once you're comfortable, it's handy to run the test (Lesson 9) and then the export in one go.
The web version's folder ends up with files like these:
index.html 5KB
index.js 310KB
index.wasm 37MB ← Godot itself (the template)
index.pck 190KB ← your game's data
index.png / index.icon.png / index.apple-touch-icon.png
index.audio.worklet.js / index.audio.position.worklet.jsThe biggest file is index.wasm (Godot itself); your game's data, index.pck, is only about 190 KB. We also confirmed that tests/test_game.gd isn't included.
Check the exported game
Windows version
Double-click pyonpyon-coin.exe: the window title shows "Hop Hop Coins," and you can play from the title screen. It runs from this exe alone, even on a computer without Godot installed.
When you first hand it out, Windows may show a blue "Windows protected your PC" screen. It appears for unsigned exe files that aren't well known yet. Players can start the game with "More info" → "Run anyway," but it's considerate to mention on your download page that this screen may appear.
Web version
The web version won't run if you double-click index.html. Browsers don't allow loading wasm from files on your computer (file://). To check it locally, run a small web server. If you have Python installed, run the following command in the web version's folder:
python -m http.server 8000Open http://localhost:8000 in your browser, and after the Godot logo, the title screen appears. To stop the server, press Ctrl+C in the Command Prompt.
If the Web preset has Runnable checked, you can also choose Run in Browser from the Remote Deploy button in the top right of the editor. It exports and starts a server in one step, which is handy when you want a quick check.
Publish on itch.io
itch.io is a site where you can publish indie games for free. If you upload the web version, anyone who opens the page can play it right there. The steps are always the same, so here we'll walk through them in text.
Prepare the files to upload
- Open the
pyonpyon-coin-export\webfolder, select all the files inside, and compress them into a ZIP (not the folder itself:index.htmlshould be at the very top level of the ZIP). - If you're also releasing the Windows version, put
pyonpyon-coin.exein a separate ZIP.
Create the project page
- Create an itch.io account, log in, and choose Upload new project from the menu in the top right.
- Enter the game's name in Title and the page address (letters and numbers) in Project URL. Write a one-line description in Short description or tagline.
- Set Kind of project to HTML. This makes it a "game you can play in the browser" page.
- For Pricing, choose No payments for a free game, or $0 or donate if you'd like to accept tips.
- Under Uploads, upload the web version's ZIP and check This file will be played in the browser below it. If you also uploaded the Windows version's ZIP, check Windows for that one.
- Under Embed options, set Viewport dimensions to
1152×648(the size of the game screen). Check Fullscreen button to add a button for playing in fullscreen. - Leave SharedArrayBuffer support, in the same area, off. We exported with Thread Support off, so it isn't needed (turning it on can actually interfere with some browsers and with loading ads or analytics).
- Add a description, genre, tags, and screenshots (2 or 3 shots of the game). Be sure to write down the controls (arrow keys / A and D to move, Space to jump).
- Set Visibility & access to Draft at first and save, then check that the game actually plays on the page that appears. If everything's fine, set it to Public and save to publish it.
When you fix the web version, export it again, make a new ZIP, and on the same page delete the old file and upload the new one. Bump the Version when you do, so you can tell which version people played.
- Go through the Lesson 9 checklist again, using the exported version. Things that don't happen in the editor can happen in an exported build (the "tofu" boxes above are exactly that).
- Open the web version in Chrome, Edge, Firefox, and so on, ideally in two or more browsers. Phones have no keyboard, so the game can't be played on them; mention that on the page too.
- Check the licenses of the assets you used (this series' sounds, images, and font), and add credits to the page if needed.
Steam and other places to publish
- Steam: you sign up for Steamworks and pay a fee for each game (the Steam Direct fee, US$100). There's a review of your store page and a preparation period before release. Godot games can be released there by exporting a Windows version and so on. When you want to use Steam features like achievements, an extension called GodotSteam is commonly used.
- Phones (Android / iOS): Godot can export to Android and iOS too. However, you need to set up the Android SDK, or a Mac and Xcode, register with the stores, and rework the game for touch controls. For your first game, we recommend releasing a web version.
- Other places on the web: a web version with Thread Support off runs on any ordinary web server. You can also publish it on free hosting like GitHub Pages.
Common pitfalls
| Symptom | Cause and fix |
|---|---|
| The export window says "Export templates for this platform are missing:" | The templates aren't installed, or their version is different from your Godot. Use "Manage Export Templates..." to install templates for the same version as your current Godot. |
| Text shows up as boxes in the web version | You haven't set a font that contains those characters in GUI → Theme → Custom Font. If only characters you newly added are boxes, the font doesn't contain them. |
Opening index.html shows a blank white page or an error, and the game doesn't run | You opened the file directly. Open it through a web server, such as python -m http.server. |
| itch.io shows a "SharedArrayBuffer" or "Cross Origin Isolation" error | You exported with Thread Support on. Turn it off and export again, or turn on SharedArrayBuffer support on itch.io. |
| itch.io says it "can't find index.html," or shows a list of files | The ZIP has an extra folder level inside. Select the files themselves and compress them again so that index.html is at the top level of the ZIP. |
| The web version's screen stays small, or its edges are cut off | Stretch → Mode is still disabled, or Canvas Resize Policy isn't set to Adaptive. Also match itch.io's Viewport dimensions to the game's size. |
The exported build contains lots of .png files you don't recognize | You set the output inside the project, so icons from a previous web export got imported. Move the output outside the project and delete the files that were created inside it. |
| No sound (web version) | Browsers don't play sound until you click the page or press a key once. The sound starts when you press "Start" on the title screen. |
Working with AI
Exporting involves lots of settings, and mistakes are easy to miss. You'll feel more confident if you have AI check with you "what each setting is for, and what it should be."
- A (chat): it's good at explaining what settings mean, the itch.io steps, and what error messages mean. You do the actual exporting and uploading.
- B (Claude Code, etc.): it can read and write
export_presets.cfgandproject.godot, export with--headless --export-release, and go as far as starting a web server (have it editproject.godotwhile the editor is closed). Downloading the templates, and logging in to and uploading to itch.io, are safer done by you. - C (+ MCP): with Godot MCP Pro, the AI can read the list of presets and their settings inside the editor (
list_export_presets,get_export_info), change project settings (set_project_setting), and even export (export_project). However, opening the exported web version in a browser to check it is work outside MCP.
Whichever approach you use, play the exported version yourself before you publish. As with the "tofu" boxes, some problems are invisible in the editor.
Series recap, and where to go next
- An exported game is "the game data (.pck) + an export template." Install templates of the same version as your Godot
- Before publishing, decide the name, version, icon, and Stretch → Mode (
canvas_items) - A web build can't use the player's system fonts, so any character not in the game's font shows as a box. Set a font you're allowed to distribute (such as an OFL font) as the Custom Font
- Use Thread Support off and the Compatibility renderer, so the web version runs wherever you put it
- Put the output outside the project. Leave the tests out with the exclude filter (
tests/*) - You can export from the command line with
--headless --export-release "preset name" - On itch.io: Kind of project = HTML, upload the ZIP and check "This file will be played in the browser," and set the Viewport to 1152 × 648
And with that, Hop Hop Coins is complete. Starting from opening the editor in Lesson 1, through nodes and scenes (Lesson 2), GDScript (Lesson 3), input and movement (Lesson 4), jumping and tilemaps (Lesson 5), signals (Lesson 6), UI and screen transitions (Lesson 7), sound and game feel (Lesson 8), testing (Lesson 9), and finally exporting and publishing (Lesson 10), you've gone through the whole process of making a game and getting it to people, with your own hands.
From here, you could head in directions like these:
- Grow this game: add more stages, put in moving platforms or a goal flag, make a leaderboard for the best times. All of it can be done by combining the tools used in this series.
- Lesson 11, "Bonus: one-prompt games by genre": using six games made by asking AI just once, you'll learn how to ask AI for a game, and how to read and grow what it makes.
- Genre tutorials: platformer, tower defense, match-3, bullet hell shooter, survivors-like, 3D ball rolling.
- Play some examples: in the showcase, you can play games made with AI and Godot in your browser.
- When you upgrade Godot: see How to safely upgrade your Godot version. Don't forget to update the templates along with it.
The next lesson, Lesson 11, is a bonus advanced lesson for the series. After building everything by hand up to now, you'll surely be able to spot both the strengths and the risks in games that AI makes.
Want AI to help all the way through checking your export?
With Godot MCP Pro, Claude Code or Cursor can read your project settings and export presets inside the editor, and even run the export. Combined with the playtesting from Lesson 9, you can go around the "fix → play and check → export" loop together with AI (190 tools, $15 one-time purchase). You can finish this series without MCP.