Examples gallery
Every example is a real, standalone project under the vgai monorepo’s examples/<id>/ — its
own vgai.game.json, package.json, and vite.config.ts, not bundled inside a scaffolded
project. Get one’s source to read or build on: npx @vgai/cli@latest create <name> --example <id>
makes a correctly-rewritten standalone copy. Each is a GameAdapter you can open in the editor
and play.
The examples
Section titled “The examples”| Example | What it shows | Lesson |
|---|---|---|
default | A fresh scaffold’s own starter scene — camera, lights, ground plane | — |
third-person | KCC movement, orbit cam, XState-driven idle/walk/run blend, pushables, enemies | Third-person capstone |
fps | Pointer lock, throwable balls, dynamic physics | FPS capstone |
vehicle | Raycast vehicle: suspension, steering, ramps, obstacles | Vehicle capstone |
rts | Isometric camera, box selection, navmesh crowd | RTS capstone |
editor-tutorial | All-systems showcase (meshes, materials, lights, physics, particles, audio, bloom, debug draw) | Editor: first scene |
third-person-arena | Server-authoritative tag with AI bots + game phases, ships its own Colyseus server/ (arena_room); the in-round arena scene is a game-internal scene switch within this same project, not a separate example | Multiplayer |
ik | Skeletal CCD inverse kinematics arm | IK capstone |
learn-triggers | Sensor zone: a kinematic Mover crossing an onTriggerEnter/onTriggerExit sensor | Triggers quick-start |
learn-joints | Revolute physics joint: a fixed pivot + dynamic arm swinging as a pendulum | Joints quick-start |
learn-splines | A scene spline rendered as a path with a marker riding the CatmullRom curve | Splines quick-start |
learn-matfiles | Shared material: three shapes reference one polished-gold .mat.json via materialRef | Material files quick-start |
hp-hud | React state bridge: a Health component ticks HP down; the HUD re-renders via useGameState (zero polling) and shows a shell state through the death→respawn gap | React HUD |
littlest-tokyo | GLTF diorama: runtime-loaded animated model with tilt-shift/bloom/vignette postprocessing | GLTF quick-start |
feature-scenes | Scene-only showcase project: mounts instanced-grid, plus five more editor-openable technique scenes (ocean, terrain, water-shader, learn-skybox, particles) not mounted at runtime | Instancing/terrain/shader quick-starts |
starfighter | Visual-quality flying showcase: procedural ship + photoscanned-asteroid instancing + ACES/bloom grade, all scene-authored | — |
tri-world | An abstract clock composed from Three.js point geometry, a PixiJS dial, and semantic React annotations reading shared state | — |
arena_room marks the multiplayer example backed by a Colyseus room.
Ingested (unmodified) — real upstream games, zero source diff
Section titled “Ingested (unmodified) — real upstream games, zero source diff”These are not vgai reimplementations. Each is a real, third-party three.js game vendored byte-for-byte from upstream and run through vgai’s ingest adapter — the marquee proof that vgai loads existing games unmodified. See Loading Existing Games and Ingest a game.
| Ingested game | Upstream | What it proves |
|---|---|---|
racing-game | pmndrs/racing-game (R3F, MIT) | marquee ingest — a full R3F racer, unaltered |
simcity | dgreenheck/simcity-threejs-clone | a structurally different single-player game |
tanks | colyseus/realtime-tanks-demo | a server-authoritative multiplayer client, unaltered |
And three real PixiJS games run unmodified via the world2d ingest adapter (the 2D counterpart) — verified byte-for-byte against upstream:
| Ingested PixiJS game | Upstream | What it proves |
|---|---|---|
bubbo-bubbo | pixijs/open-games (MIT) | a real PixiJS game, in-realm capture + edit |
puzzling-potions | pixijs/open-games (MIT) | PixiJS v8 + Spine, unaltered |
flappy-pixi | aliexme/flappy-pixi (MIT) | PixiJS v6 via version-skew capture |
And one real native-React DOM game runs unmodified via the react ingest route — no canvas, no renderer: the game’s component tree mounts as a DOM layer, deduped onto the host React 19:
| Ingested React game | Upstream | What it proves |
|---|---|---|
react-rpg | ASteinheiser/react-rpg.com (MIT) | a native-React dungeon crawler, embed-only by design |
See also
Section titled “See also”- Build a Game (Capstones) — the guided builds.
- Loading Existing Games — how to run existing third-party games on vgai, unmodified.