Skip to content

Third Person Arena

examples/third-person is vgai’s maintained single-player TPS foundation. The match combines camera-relative locomotion, over-shoulder aiming, weapons, animated AI opponents, combat feedback, lives, restart, audio, effects, and a React HUD. It contains no networking.

In an engine checkout, vgai edit examples/third-person opens the maintained source.

  • src/world.tsx mounts the world composition.
  • src/scenes/ contains complete scene compositions.
  • src/prefabs/ contains placeable, story-backed players, enemies, weapons, pickups, jump pads, and environment pieces.
  • src/lib/character/ owns reusable character movement helpers built directly on Rapier.
  • src/ui/third-person-hud-world.tsx is the separate dom root.
  • src/tools/autoplay.ts exposes game-authored routes and structured events for repeatable Play-mode proof.

World behavior is source-owned React code using R3F hooks, Rapier, Three.js animation, and the project’s own state. The editor inspects that same hierarchy and writes ordinary JSX props back to source.

See Input, Rigid bodies, Animation, and React UI.