9. Ship it
Goal: a page on a static host.
sh
npm run typecheck # the project against the packages' types
npm test # the missions
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 goesUpload dist/ to any static host (GitHub Pages, Netlify, an S3 bucket). It holds the maps, public/games/campaign/, only the shared art the game uses, the stylesheet and the typefaces. Progress and saves live in the player's browser. A server (npm run server) is only needed for online games. See Ship it.
Where to go from here
- A fourth mission: a map with names, a file in
src/campaign/missions/, a line inscenes.tsand inindex.ts'sMISSIONS. - The hero: Let's add a hero with abilities and items.
- More enemies: a new raider in
units.tsandWAVE_UNITS, waves in the Waves panel, a brain withpatrol,ambush,fleeWhen(Computer players). - Your own art: Bring in a model.
- Offline or desktop: A desktop game, offline.
- Online: Online, on a server.