← Back

What's in the box

The murow npm package ships the core engine, the murow/webgpu renderer, and the murow/netcode multiplayer layer. Here's what each part does.

bun install murow

Data-oriented ECS

Murow's World stores components as typed binary schemas in Structure-of-Arrays layout: one flat typed array per field, not objects per entity. A component is a descriptor, not a class; an entity is a plain number.

There are five access tiers so you pick the right trade-off per system: RAW (manual typed-array hoisting, fastest), Fields (one typed bundle per component, the recommended default for hand-written systems), Hybrid and Ergonomic (the System Builder, for readability), and Direct (one-off work, slowest, never in hot loops).

It holds 60 FPS at 50k entities and scales to ~100k, beating bitECS up to ~25k entities on a 2011 CPU with substantially tighter worst-case frame times (no GC spikes).

Fixed-tick simulation

The GameLoop is the heartbeat: a fixed-rate tick for deterministic game logic and a variable-rate render with interpolation. Tick rate is configurable (10-30 Hz is typical for multiplayer); the renderer smoothly interpolates the frames in between.

Drivers cover every context: requestAnimationFrame on the client, setImmediate / setTimeout on the server, and manual mode for tests or driving many simulations from one clock. Determinism is first-class: seed a SimpleRNG instead of Math.random for replays and lockstep.

Server-authoritative netcode

The high-level layer (murow/netcode) gives you GameServer and GameClient. You define intents, predictions, and networked components once in shared code; the server applies predictions authoritatively and ships snapshot deltas, while the client runs the same prediction speculatively and reconciles via rollback + replay when the authoritative state arrives.

Underneath sits a lower-level layer (murow/net + murow/protocol) with transport-agnostic networking and binary codecs, for when you need a custom snapshot pipeline. Both ship in the one package.

Lag compensation & interest management

Hit detection is only fair if the server checks against the world as the shooter saw it. The LagCompensation plugin rewinds registered components to the client's tick inside a handler, so hitscan lands where the player aimed.

For large worlds, the AoiGrid plugin replicates only the entities within a peer's area of interest, with hysteresis to avoid boundary flicker: bandwidth scales with what each player can perceive, not with the whole world.

WebGPU renderer (2D + 3D)

murow/webgpu is the reference backend, powered by TypeGPU. It handles GPU-side frame interpolation (your low tick-rate simulation looks smooth at 144 Hz), frustum culling, distance-based animation culling for crowds, sparse-batched draw calls, glTF skeletal animation with crossfade, and instance recycling: none of which you write yourself.

The engine itself is renderer-agnostic: the abstract renderer contracts, asset pipeline (PrefabBucket, glTF and spritesheet parsing, skeletal animation), and CPU hitbox/raycasting are pure CPU. Subclass the base renderer to target Three.js, Pixi, or anything else.

Compute shaders & typed DSL

Write WGSL in TypeScript with full type safety. ComputeBuilder / ComputeKernel make GPU compute first-class: particle physics, simulation, anything massively parallel and custom instanced geometry can read straight from a compute buffer with zero copies.

The same typed data-layout DSL (d and std) describes buffers and the math you run inside vertex, fragment, and compute closures.

The full, AI-readable API reference lives in llms.txt.