Multiplayer 3D Game Engine

mavon-engine

(Coming Soon)

Build multiplayer 3D games for the browser with a unified server-client architecture, integrated physics and real-time networking.

mavon-engine is full-stack game engine designed for creating multiplayer 3D browser games. Unlike fragmented solutions that require piecing together multiple libraries, mavon-engine provides everything you need in one cohesive package: server-side game logic, client-side rendering, physics simulation, real-time networking, and advanced debugging tools.

Key Features

Full-Stack Multiplayer Architecture

A unified server and client implementation that shares the same entity hierarchy. The BaseGame class handles server-side logic headlessly, while the Game class extends it with full 3D rendering, audio, and input handling.

  • Shared Entity System - Write once, run on server and client
  • Automatic State Synchronization with bandwidth optimization
  • Distance-Based Culling for entity visibility
  • Hash-Based Change Detection to minimize network traffic

Integrated 3D Physics with Rapier

Rapier 3D fully integrated and pre-configured for game development with synchronized simulation across server and client.

  • Kinematic Character Controller with slope climbing and sliding
  • Configurable physics parameters (45° climb, 30° auto-slide)
  • Full Body & Collider Management
  • Physics Debug Visualization in real-time

Advanced 3D Rendering with Three.js

Built on Three.js, delivering stunning visuals with developer-friendly APIs and hardware-accelerated graphics.

  • Custom GLSL Shader Support
  • Debug Rendering Modes (wireframe, armature, physics overlays)

Real-Time Multiplayer Networking

Networking built on geckos.io with WebRTC-based low-latency communication.

  • WebRTC-Based Communication for real-time data channels
  • Bandwidth Tracking & Monitoring
  • Command Buffering & Processing across network latency
  • Server Health Monitoring with built-in HTTP endpoints

Skeletal Animation System

Bring your characters to life with smooth, professional animations and seamless state management.

  • Animation State Management with logical organization
  • Smooth Fade Transitions with configurable duration
  • GLTF Model Support with Draco compression
  • Efficient Skeleton Cloning for instanced models

Particle Effects Framework

Create immersive environments with a modular, performance-optimized particle system.

  • Built-In Effects - Rain and smoke ready to use
  • Custom Shader Support for unique particle visuals

Architecture That Scales

Entity Component System

A state-based entity architecture that makes complex game logic manageable:

GameObject (base entity)
├── Actor (+ state management)
│   ├── Entity3D (+ 3D rendering, animation)
│   └── LivingActor (+ health system)
└── NetworkedGameObject (+ synchronization)
    └── NetworkedActor (+ networked state)

EntityState Pattern

Organize complex behaviors with a powerful state machine system:

  • Stack-Based State Management for nested behaviors
  • Lifecycle Hooks - enter(), leave(), suspend()
  • Automatic Animation Integration
  • Network Synchronization across clients

World Streaming

Handle large game worlds with chunk-based streaming:

  • BaseChunkManager for spatial partitioning
  • Load/unload world sections dynamically
  • Distance-Based Loading for nearby chunks
  • Automatic Resource Cleanup for distant areas

Server-Client Communication

Optimized data flow for responsive multiplayer:

Player Input → Client Commands → Server Processing → Physics Step → State Sync → Networked Clients → Client Rendering

  • Adjustable Server Tick Rate

Built With Modern Technologies

Core Stack

TypeScript 5.9+ Type-safe development
Three.js 0.176+ 3D graphics rendering
Rapier 3D 0.18+ Physics simulation
geckos.io 3.0+ WebRTC networking
Express.js 5.1+ HTTP server backend

Development Tools

  • Vitest - Unit testing framework
  • Vite - Build tool and dev server
  • vite-plugin-glsl - GLSL shader loading
  • Tweakpane - Runtime debugging UI
  • three-perf - Performance monitoring

Use Cases (WIP)

Action RPGs

Build character-driven games with the state machine system for complex behaviors, skeletal animation for smooth combat, and health/damage systems.

PvP Combat Games

Real-time networking, physics synchronization, and bandwidth optimization for competitive multiplayer where every millisecond matters.

Open World Multiplayer

Chunk-based streaming and distance-based culling for expansive game worlds without overwhelming resources.

Physics-Based Games

Integrated Rapier physics with character controllers, impulse application, and synchronized simulation across clients.

Why Choose @mattvb91/mavon-engine?

Complete Solution
Rendering, physics, networking, entity management, asset loading, animation, particles, and debugging tools in one cohesive package.
Server + Client Unity
Write game logic once and it works on both server and client. No more maintaining separate codebases.
Networking
Distance-based culling, hash-based change detection, bandwidth monitoring, and automatic state synchronization built in.
Developer Experience
Tweakpane integration, debug visualization, performance monitoring, and comprehensive TypeScript types.
Extensible Architecture
Abstract base classes let you customize servers, entities, and game logic. Use provided implementations or extend for your needs.

Getting Started

Installation

Coming soon

Basic Setup

Coming soon

Build Multiplayer 3D Games Faster

Server + Client + Physics + Networking + Rendering + Animation + Particles + Debugging

All in one package. All working together. All TypeScript.