Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Shipping It

A finished game nobody can reach is a diary entry. This chapter is the last mile: putting the web build on a URL, the iOS build on a phone, and the ten-minute checklist that separates “works on my machine” from “works on the bus”.

The web build

Deployment is declared in mar.json and executed by one command. For a frontend-only game (most games in this book), the static target is the right one; the example games deploy to Cloudflare Pages:

{
  "name": "star-catch",
  "deploy": {
    "cloudflare-pages": {
      "app": "star-catch",
      "account": "env:CLOUDFLARE_ACCOUNT_ID",
      "apiToken": "env:CLOUDFLARE_API_TOKEN"
    }
  }
}
mar deploy star-catch

That builds the production bundle and publishes it; your game is on a real URL, HTTPS included, a minute later. Credentials come from the environment (the env: indirection), so nothing secret lives in the repo. A fullstack game (chapter 16’s multiplayer) declares a fly block instead and deploys as a self-contained server binary with its database; same single command, and the CLI walks you through provisioning and secrets the first time.

Two production notes for game pages specifically. The web build is a static bundle, so once loaded it keeps playing on flaky café Wi-Fi; only services need the network. And there is no client-side save API in the box today: a frontend game’s progress lives for the session. If persistence is part of the design (unlocks, best scores), that is the fullstack path with the Repo, plus sign-in if scores follow the player.

The iOS build

mar build --target ios

scaffolds the complete Xcode project into dist/ from the "ios" block in your manifest (bundle id, display name). From there it is the ordinary Apple pipeline: run on a device from Xcode today, TestFlight for friends this week, App Store review when ready. The game modules are native; there is no web view to explain to a reviewer.

The debug build’s dev-server auto-connect (it finds your mar dev by matching app name on the local network, with a visible banner) makes device-in-hand iteration the pleasant part of an iOS release, which may be a first.

The ship checklist

Every item on this list is cheap before launch and embarrassing after. The example games’ collective scar tissue, in checklist form:

Feel and fairness

  • Playable start to finish with each input scheme alone: keys only, touch only, pad only (whichever you support).
  • The busiest scene holds frame rate on the oldest phone you care about (chapter 14’s measure-first ritual).
  • Difficulty ramp survives a stranger. Watch one person play without speaking; where they die confused, add a telegraph.

Manners

  • A mute button, working, findable on the title screen (Sound.setMuted).
  • A pause (subscriptions drop the tick; chapter 4 made it two lines).
  • prefersReducedMotion honored (chapter 12’s flashes toned down).
  • Nothing depends on hover, long-press, or right-click.

Screens

  • Resize and rotation mid-game: reflow adapts, fixed stage re-letterboxes, mattes cover (chapter 15).
  • HUD clear of notches and home indicators on the tallest phone.
  • Text readable at 1x on a small phone: sizes 10 and up, tested, not assumed.

Truth

  • Title, restart, and game-over loops exercised twenty times in a row (the restart-state bug hides here: some field start forgot to reset).
  • For deterministic features: a recorded run replays identically after your latest balance patch. If not, you changed the rules; version your seeds or invalidate old replays deliberately.
  • Sound mix checked on laptop speakers, phone speaker, and one pair of headphones (they disagree more than you think).

Version your tuning like the code it is

Post-launch, the temptation is to hot-patch difficulty constantly. Do, but leave tracks: every tuning constant already lives in one named block (chapter 13), so a balance patch is a diff a player could read. If your game has replays, daily seeds, or leaderboards, remember what chapter 16 established: the rules are the protocol. A physics tweak invalidates old proofs; ship those as marked seasons, not silent edits.

Send it

The whole pipeline, end to end: mar dev while you build, mar deploy when the web build is ready, mar build --target ios when it deserves a home screen icon. No engine licenses, no export templates, no build farm: a language, a folder, and a game that runs everywhere you promised the cover it would.

What remains is the part no book supplies: the fifty small decisions that make your game feel inevitable. The appendices will keep the machinery out of your way while you make them.