# Export to Web — your Godot game as a browser game

*Goal: a folder of web files you can upload to itch.io (see the Publish
Your Game pack) so anyone with the link can play in their browser.*

## Before you export

- Your acceptance file's boxes should all be checked in the editor
  first. Exporting a broken game gives you a broken game in two places.
- Know your numbers: Godot 4.7.2 editor was 78 MB (Linux) to 171 MB
  (macOS) to download. The **export templates are a further 1.28 GB**,
  downloaded once, inside Godot. Budget the time; it's a one-off.

## Steps

1. **Install the export templates.** In Godot: Editor → Manage Export
   Templates → Download and Install. (This is the 1.28 GB step.)
2. **Add the Web preset.** Project → Export → Add… → Web.
3. **Set the basics.** Give the export a name; the output file must be
   `index.html` for itch.io's browser play. Progressive Web App
   settings can stay off for a first game.
4. **Export.** Project → Export → Export Project. You get `index.html`
   plus its engine files (`.wasm`, `.pck`, `.js`, audio worklet files).
5. **Zip the whole folder** — every file, `index.html` at the zip's
   root, not inside a subfolder. itch.io looks for `index.html` at the
   top level; a zipped subfolder is the #1 reason first uploads "don't
   work."

## The itch.io checkboxes that matter (from a proven upload)

- Upload the zip; tick **"This file will be played in the browser."**
- Set the viewport to your game's window size (e.g. 1280×720).
- If the game boots to a black screen or an error about
  SharedArrayBuffer / cross-origin isolation, enable the
  **SharedArrayBuffer support** option in your itch project settings —
  Godot 4 web exports need it, and itch added that toggle for exactly
  this.
- Tick **mobile friendly** only if your controls genuinely work on
  touch (clarifier Q5 — keyboard-only games should leave it off).

## Honest limits

- Web exports load the whole game up front; keep the build lean
  (your acceptance file's size cap exists for this).
- Some older browsers and locked-down school/work machines block the
  technologies web exports need. A Windows download export alongside
  the web build (same Export dialog, different preset) is the usual
  fallback — it costs you one more preset, nothing else.
