Skip to content

Deploy a web game

Web games have a smoother deployment story than desktop because there’s no installer, no code signing, no platform-specific gatekeeping (mostly). The hard part is hitting “build” cleanly, smoke-testing across browsers, and configuring each platform’s metadata correctly.

Forge’s html5-deploy factory skill knows the per-platform tactics. This page is the high-level workflow.

Your dev server (pnpm dev, vite dev, etc.) gives you a development build. Production needs a separate build command, typically pnpm build or vite build. Wire it into a task:

[[tasks]]
name = "build"
label = "Production build"
command = "pnpm build"

Run Task: Production build from the command palette. Output usually lands in dist/ or build/. Confirm the folder structure is what your target platform expects (most want a flat index.html with adjacent assets/).

For Godot, use --headless --export-release against your HTML5 export preset. See Godot build mode.

Don’t ship a build that hasn’t been opened in a real browser. The Forge preview tab points at your dev server, not your production build, so do this manually:

Terminal window
pnpm dlx serve dist

Open the URL it prints in Chrome, Firefox, and Safari. Check:

  • The game loads without console errors.
  • Input works (keyboard, mouse, touch on mobile if it’s mobile-friendly).
  • Audio plays (browsers gate autoplay; you need a user-initiated click or tap to start audio).
  • Performance feels right.

The html5-deploy skill has the deep specifics for each. Triggered by phrases like “itch.io”, “newgrounds”, “html5 deploy”, “steam web build”. Ask the agent for guidance on the platform you’re targeting.

High-level shape per platform:

  • itch.io: Zip the build directory, upload via Butler or the web uploader. Set viewport dimensions, fullscreen toggle, mobile-friendly flag. Sandbox restrictions on iframe embedding worth checking.
  • Newgrounds: Similar to itch but with stricter zip structure (single index.html at the root). Their preview tool has known quirks worth working around.
  • Crazy Games: Has an SDK for ads and analytics. Integration adds maybe 50 lines.
  • Steam HTML5: Steamworks Web Builds is awkward. Builds run in a sandboxed Steam browser; some web APIs are missing or behave differently. Expect more debugging than the other platforms.

If the game is intended for mobile, the skill covers viewport meta tags, touch input, autoplay-blocked audio, and battery-friendly render loops. Mobile testing means real devices; emulators miss most of what matters.

  • Privacy policy linked if you collect any data (analytics, accounts, cloud saves).
  • Attribution for assets you didn’t make (Creative Commons, vendor TOS for AI-generated content).
  • A capsule image, screenshots, and a one-line description ready to paste into the platform’s listing.

Steam in particular has a long checklist. Ask the agent for the steam-page skill’s guidance if you’re going there.