Getting Started

Quick Start

Create your first game with MavonEngine.

Single-player setup

The minimum setup for a client-side game requires a Game instance.

import { Game } from '@mavonengine/core'

const game = new Game()

Game is a singleton. Call Game.instance() to get the instance. It automatically:

  • Creates a <canvas> and appends it to the document
  • Sets up the WebGL renderer, perspective camera, and audio listener
  • Starts the render loop via requestAnimationFrame
  • Initializes physics (Rapier3D) and the input manager

Multiplayer setup

For multiplayer, the server runs BaseGame headlessly and clients run Game. See the Networking section for the full setup.

Development mode

Append #debug to your URL to enable the debug panel (Tweakpane). In dev mode, the engine also activates the in-editor overlay.

http://localhost:3000/#debug

Next steps