Skip to content

Install & set up a project

You need Node.js 18+ and npm. vgai targets modern browsers with WebGL2.

Terminal window
npx create-vgai-project my-game
cd my-game

The scaffolder copies the starter template (the full example project) — or pass a flag for a minimal empty template — rewrites package.json, tsconfig.json, vite.config.ts, and project.json for your project name, and runs npm install for you.

TemplateContents
starter (default)The full template project: example games, shared UI, a Colyseus server. The fastest way to learn by reading working code.
emptyMinimal: one .vscn.json, a src/main.ts, and base config. For starting clean.
  1. From your project directory, start the dev server:
    Terminal window
    npm run dev
  2. Open the editor at http://localhost:5173.
  3. You should see the 3D viewport with the default scene. If it loads, your toolchain is working.
CommandWhat it does
npm run devEditor dev server on http://localhost:5173.
npm run buildType-check + production build.
npm run typecheckType-check engine, editor, and server code.
npm run test:unitVitest unit tests.
npm run test:e2ePlaywright end-to-end suite.
npm run validate-scenesValidate .vscn.json files against the component registry.