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

Games on the web

A web build is your game as a web page: people click a link and play, with nothing to download. It’s what itch.io takes, and any website can serve it.

Making one

  • In a browser, Export for the web (itch.io)… in the Project menu makes it and downloads it as a zip.
  • On your computer, tick Web in the Build window. You get the zip and, beside it, a folder of the same files.

Either way, the zip has index.html at its top, with the engine and your game’s cart beside it. Everything the game needs is inside it: it fetches nothing from anywhere else, so it keeps working however long it’s left where you put it.

Crash-tan’s Tip: A web page can’t keep a secret: anyone can read what’s in it, the game secret included. On the web, sealing ties your game to its page, and that’s all.

On itch.io

  1. Make a new project on itch.io, and set Kind of project to HTML.
  2. Upload the zip, and tick This file will be played in the browser.
  3. Under Embed options, set the size to your game’s screen, and under Frame options, tick SharedArrayBuffer support. Crash BASIC needs it to run in a browser at all: without it the game won’t start.

On your own website

Upload what’s in the zip, as it is, and have your web server send these two headers with every file:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

They’re what itch.io’s tick turns on for you: a browser only lets a page do what Crash BASIC needs if it’s sent them. How to add headers depends on who hosts your site; look for “custom headers” in their help.

The page won’t run from a file opened straight off your disk, either. To try it on your own computer, it has to come from a web server that sends those headers.