Skip to content

Building & Shipping

Awaken turns the scene you are editing into a playable game with no build server, no bundler config, and nothing to install - everything happens in the browser tab you already have open.

Shipping in Awaken is not a separate "build" project that can drift from what you tested. The editor's Play mode ticks the exact same runtime (@awaken/runtime) that your exported game runs, so the game you hand to a player is the game you just played. This page maps the outputs and the pipeline; the child pages go deep on each.

The three outputs

Everything lives under the File ▾ menu in the Toolbar. There are three ways to get a running game, plus project save/open:

OutputMenu itemWhat you getRuns by…
PreviewPreview Game (new tab)A throwaway run in a new tab, served over httpOpening a tab (no file saved)
game.htmlExport Game (game.html)…One self-contained, double-clickable HTML fileDouble-click or upload anywhere
FolderExport Game (folder, for hosting)…game.html + a scene.fg sidecar (smallest)Serving it from a host/local server

And two project operations, which save your work (not a game):

OperationMenu itemFormat
Save ProjectSave Project (⌘S) / Save Project As…Binary .awaken file (every asset byte)
Open ProjectOpen Project…Binary .awaken file

TIP

A .awaken project is your source-of-truth working file. A game.html is a compiled, read-only artifact - you cannot re-open it in the editor. Always keep the .awaken around.

Edit == Play == Ship

The three outputs above differ only in packaging. The scene data, the compiled behaviours, and the runtime that steps them are identical across editor Play, Preview, game.html, and the hosted folder. There is no second code path that can silently diverge.

Concretely: the editor Viewport, the standalone Player, and every export all construct the same PlayController over DEFAULT_SYSTEMS, register the same script behaviours, and drive the same Rapier physics runner. When you press ▶ in the editor you are running the shipped game.

How an export is built

Preview and both export shapes share one pipeline. The editor gathers only the assets your scene actually uses, compacts the scene graph, quantizes and packs the geometry into a compact binary container, compresses that once with Zstd, and stamps it into a pre-built player template.

The heavy lifting - used-asset collection, geometry quantization, and Zstd compression - is covered on Export game.html. The binary container and version numbers are on Data Formats.

📸 Screenshot - save as img/shipping-file-menu.png

The Toolbar File ▾ menu open, showing Preview Game, Export Game (game.html), Export Game (folder), and the Open/Save Project items.

In this section

  • Preview - the one-tab throwaway run, why it is served over http, and what to do when it will not open.
  • Export game.html - the single-file export in full: used-asset collection, geometry packing, script compilation, compression, and the player-template dependency.
  • Export Folder (for hosting) - the smallest output, its scene.fg sidecar, and hosting notes for static hosts like Vercel or itch.io.
  • Saving & Opening Projects - the .awaken format, in-place save on Chromium, the unsaved-changes guard, and why auto-save is off.
  • The Player Runtime - the standalone player, its two build shapes, and how it boots a scene.

See also

Awaken — browser-native WebGPU game engine.