Ship it
A game is a static page. npm run build writes it to dist/; any static host serves it.
sh
npm run build # the page into dist/, the maps and the game's folder with it
npm run preview # the built page served here, to look at before it goesDone: upload dist/. It holds everything under public/ (your models, sounds, textures and the shared art you use), the maps your code imports, the stylesheet and the typefaces (no font service is called).
Run the server too
Games on a server need a Node process beside the page: npm run server. See Run a server and join it.
Make it work offline, or as a desktop app
A service worker keeps the build on the device (the example's offline() Vite plugin and keepOffline). An Electron shell makes it an installable app with saves as files: create the project with --desktop, then npm run app. See A desktop game, offline.
Reference
| Concern | Where |
|---|---|
| Graphics quality | GameView.world.quality: presets, a pixel budget, what to lower when frames run long. Players change it in settings. |
| Renderer | WebGPU: a browser without it is told so on the page. |
| Crashes | A game scene's error and onCrash. |
See Large battles to keep it smooth, and The interface for the settings screen.