---
name: run
description:
Start the BLIT386 dev server and open the game in a browser. Use this whenever the user wants to run, start, launch,
or preview the game, or see what it looks like, even if they just say 'run the game', 'start the server', or 'show
me'. To check that a change works by playing it, use test-the-game.
---
# Run the game
Start the BLIT386 dev server and open the game in a browser.
## Steps
1. In the project folder, run `{{pmRunDev}}` (or `npx blit run`).
2. The dev server does not open a browser. Open `http://localhost:5173` (or the next free port it prints).
3. Edit and save - with the starter's `blit386` Vite plugin, most code and `public/` asset edits keep the game running
(hot reload) instead of wiping state. Full detail: `docs/hot-reload.md`. There is no need to restart the server after
each edit.
4. To stop the server: press `Ctrl+C` in the terminal.
## Notes
- If the port is in use, read `docs/when-something-breaks.md` for the "port already in use" fix.
- If your editor has a built-in preview pane that reads `.claude/launch.json` (the Claude desktop app does), it can
start the game and show it there, with no terminal step. That file is yours to edit, for example to change the port.
- The game works without WebGPU (the engine falls back to Canvas 2D), so it runs in any modern browser.
- Older project, and every save full-reloads the page? Run `npx blit migrate --write` (blit386 1.4.0+) to wire the
plugin into `vite.config`, then restart once.