Skip to content

Getting started ​

Create a game ​

bash
npm create debuff@latest my-game
bash
pnpm create debuff my-game
bash
yarn create debuff my-game
bash
bun create debuff my-game

Then:

bash
cd my-game
npm install
npm run dev

Open the URL it prints. Press ` to show the dev overlay, which has a frame-time graph and live sliders for every tunable value.

What you get ​

text
my-game/
  assets/            source art, audio, data; only files you reference ship
  scenarios/         deterministic gameplay tests (JSON)
  src/main.ts        your game
  index.html
CommandWhat it does
npm run devDev server with hot reload
npm run buildProduction build, plus a size report that fails if dev code leaks
npm testRuns scenarios/*.json in a headless browser

Next ​

  • Core concepts: the game, scenes, the fixed-step loop
  • Input: actions across keyboard, pointer and gamepad
  • Tunable params: values you and your tools can adjust live