Skip to content

Getting started ​

This setup runs the browser client and verifies the engine without requiring a GPU-only test workflow.

Requirements ​

  • Node.js 22.13 or later (.nvmrc pins major version 22); the lobby stores accounts and results with the built-in node:sqlite module
  • npm, which the continuous-integration build also uses
  • Git, including submodule support
  • a current WebGL2-capable browser

Install ​

bash
git clone --recurse-submodules https://github.com/Higher-Standard-Games/shag.git
cd shag
npm install
npm run dev

Vite is configured on http://localhost:3000.

Game PK3s are not committed. Put compatible assets under public/data/ and generate/update the index when needed:

bash
npm run tools:manifest

The manifest makes archives discoverable in a browser. The runtime PK3Index builds its searchable index from that manifest; use pk3 index in a developer console when it needs rebuilding.

First browser check ​

Open the console with the backquote/tilde key, then inspect an indexed BSP:

text
developer 1
bsp load wdm2
bsp render
bsp info
camera mode freefly

camera mode selects a registered camera controller. For normal FPS gameplay, use the lobby UI or:

text
map wdm2 duel

The map command uses the configured gameplay/lobby launcher. See Map launching.

Headless check ​

bash
npm run cli:game -- --exec 'bsp load wdm2; bsp info; quit'
npm run test:simulation
npm run test:physics

The headless game runner uses bsp load; it does not register the browser gameplay launcher.

Common scripts ​

CommandPurpose
npm run devVite development server
npm run buildTypeScript and production web build
npm run previewPreview dist/
npm run typecheckTypeScript validation without emit
npm run lintBiome lint
npm run test:runOne-shot Vitest suite
npm run cli:gameHeadless engine console
npm run net:serverDedicated authoritative server
npm run lobby:serverLobby and matchmaker
npm run docs:devManual development server

Repository shape ​

text
src/
  engine/       reusable engine systems
  games/fps/    active arena-FPS game module
  games/tower/  secondary game module
  shared/       client/server deterministic contracts
  cli/          headless tools
  electron/     desktop shell
public/
  engine/       engine assets
  data/         external game data and PK3s
docs/
  manual/       this VitePress manual
  reference/    implementation reference
  research/     design investigations

The build can select a game through the GAME environment variable, but the repository remains FPS-centric and the TypeScript @game/* path maps to src/games/fps/*.

Released under the MIT License.