murow
v0.0.70
Published
A lightweight TypeScript game engine for server-authoritative multiplayer games
Maintainers
Readme
Murow
A lightweight TypeScript game engine for server-authoritative multiplayer games.
Installation
npm install murowUsage
import {
FixedTicker,
EventSystem,
BinaryCodec,
generateId,
lerp,
NavMesh,
PooledCodec,
IntentTracker,
Reconciliator
} from 'murow';
// or
import { FixedTicker } from 'murow/core';Modules
Core Utilities
FixedTicker: Deterministic fixed-rate update loopEventSystem: High-performance event handlingBinaryCodec: Schema-driven binary serializationgenerateId: Cryptographically secure ID generationlerp: Linear interpolation utilityNavMesh: Pathfinding with dynamic obstaclesPooledCodec: Object-pooled binary codec with array support (viaPooledCodec.array()) for efficient snapshot encoding. Supports zero-copy encoding withencodeInto()for minimal allocationsIntentTracker&Reconciliator: Client-side prediction
Protocol Layer
Minimalist networking primitives:
IntentRegistry: Type-safe intent codec registrySnapshotCodec: Binary encoding for state deltasSnapshot<T>: Delta-based state updatesapplySnapshot(): Deep merge snapshots into state
Works harmoniously with core utilities (FixedTicker, IntentTracker, Reconciliator).
See Protocol Layer Documentation for usage.
Network Layer
Transport-agnostic client/server abstractions:
ServerNetwork: Multiplayer game server with per-peer snapshot registriesClientNetwork: Game client with intent/snapshot handlingTransportAdapter: Pluggable transport interfaceBunWebSocketTransport: Bun WebSocket implementation (reference)
Key features:
- Per-peer snapshot registries for fog of war and interest management
- Transport agnostic - works with WebSocket, WebRTC, UDP, etc.
- Type-safe protocol integration with
IntentRegistryandSnapshotRegistry
See Network Layer Documentation for usage and examples/multiplayer-game.ts for a complete example.
Building
npm install
npm run buildLicense
MIT
