Skip to main content

Client Architecture

Areloria supports two rendering clients: a 2D isometric client (primary) and a 3D client (extended visualization).

2D Client (Primary)

The 2D client is the active release path, built with PixiJS v7 and React.

Entry Point

Rendering Pipeline

The client interpolates between server states for smooth 60 FPS rendering while server updates at 10 Hz.

State Management

Uses React’s useSyncExternalStore for reactive UI updates:

Key Features

3D Client (Extended)

The 3D client uses Babylon.js with Vite for builds:
Note: The 3D client is not the current release gate but remains part of the repository for extended visualization needs.

Client Network Protocol

WebSocket Events

Client listens for wasd:network-packet:

Sending Intents

Build Configuration

Vite Configuration

Environment Variables

Public Assets

Static assets in apps/client-2d/public/ must be explicitly copied to dist/ during Docker builds:

Debug Tools

Next Steps

Architecture Overview

System design summary

Determinism

Deterministic simulation rules

Gameplay Systems

Core gameplay mechanics

Deployment

Deploy to production