Core Concepts

Overview

Core architectural concepts behind MavonEngine.

MavonEngine is built around a small set of core concepts that compose together to form a full game.

Game Loop

The BaseGame and Game classes drive the fixed-tick and render loops.

Entity System

Hierarchical classes for all game objects: GameObject, Actor, Entity3D, LivingActor.

State Machine

Pushdown automaton pattern via EntityState for complex entity behaviors.

World Management

BaseWorld and ChunkManager manage all entities and spatial partitioning.

Event System

Lightweight pub/sub via EventEmitter used throughout the engine.

Level Editor

A level editor that loads directly from the running game instance on the page.

Physics

Rapier3D physics world and character controller, on the server and the client.

Scenes

JSON scene files shared by client and server, edited in the level editor.