Skip to content

Foundations

Foundations is the step-by-step track that teaches the vgai model by building, the way Godot’s “Step by step” does. Work through it after Get Started and before the Capstones.

  1. The Object3D is the entity — add objects, understand there’s no separate entity layer.
  2. Your first GameComponentinit / update / dispose, attached to an Object3D.
  3. Trigger callbacksonTriggerEnter / onTriggerExit with sensor colliders.
  4. Component schema & the registry — author fields with Zod; register a component.
  5. Scenes (.vscn.json) — the scene format and the three-pass loader.
  6. Prefabs (.prefab.json) — reusable entity templates with per-instance overrides.
  7. Phase ordering & the game loop — where code runs, and why order matters.
  8. The GameContext — reaching Three.js, Rapier, and the engine managers directly.
  9. Input basics — actions, input maps, keyboard/mouse/gamepad.
  10. Hot reload — edit a component live while the game runs.