Engine v0.8.0-alpha Editor v0.6.0-alpha
Guide API Playground Editor
Virtual World Simulation Platform

Particle
Realms

An open simulation platform for building complete virtual worlds. Real physics. Real chemistry. Living ecosystems.

SCROLL

A universal simulation kernel — a self-contained package that gives anyone the tools to generate and run a fully realized virtual world. Not a static scene. A living system where matter behaves like matter, fire spreads through fuel, water flows downhill, and ecosystems emerge from simple rules.

We're building every layer from scratch: a GPU abstraction that makes WebGPU feel like 5 lines of code, an entity system that scales to millions, a particle engine that simulates thermodynamics, procedural audio that turns physics into sound, and an editor that puts all of it in your hands.

THE NUMBERS

Built From Scratch

Engine since November 17, 2025 · Editor since December 3, 2025 · ~3 months of active development

1,308
Source Files
552K
Lines of Code
12
Subsystems
0
Dependencies
Engine v0.8.0-alpha
1,136 files · 445,507 lines
Started Nov 17, 2025
Editor v0.6.0-alpha
172 files · 107,035 lines
Started Dec 3, 2025
Subsystem Breakdown
Particle Sim
334
Rendering
289
Shaders
110
Audio
62
GPU Core
55
World
48
Physics
50
ECS
46
AI
43
Particle Render
42
Math Library
34
Voxel
24
01

Virtual GPU

Power without complexity

Unified GPU abstraction layer. Buffer pooling, automatic pipeline caching, shader compilation with hot reload. 82% less code than raw WebGPU — 5 lines from zero to GPU compute.

vgpu.buffer vgpu.pipeline vgpu.shader vgpu.command
const vgpu = await getVGPU();

// Create a storage buffer
const buf = vgpu.buffer.create({
  size: 4096,
  usage: 'storage'
});

// Compile & dispatch in 3 lines
const mod = vgpu.shader.compile('sim', wgsl);
const pipe = vgpu.pipeline.compute({ module: mod });
vgpu.command.dispatchCompute({
  pipeline: pipe,
  workgroups: [64]
});
02

GPU Particle System

100 million particles, real physics

Thermal simulation, SPH fluid dynamics, SDF collision, chemical reactions, flocking behaviors, and volumetric rendering. All computed on the GPU. Particles interact with fire, water, wind, and each other.

thermal SPH fluids SDF collision chemistry flocking
// Particle compute pipeline
@compute @workgroup_size(256)
fn simulate(@builtin(global_invocation_id) id: vec3u) {
  var p = particles[id.x];

  // Thermal dynamics
  p.temp += heatTransfer(p, neighbors);
  p.phase = phaseTransition(p.temp);

  // SPH fluid pressure
  let pressure = sphDensity(p, grid);
  p.vel += sphForce(pressure) * dt;

  // SDF collision
  let sdf = sampleSDF(p.pos);
  if (sdf < 0.0) { reflect(p, sdfNormal); }
}
03

Entity Component System

Millions of entities, zero overhead

Generational IDs prevent dangling references. Archetype-based storage for cache-friendly iteration. Phased execution, component healing on load, and full scene serialization.

generational IDs archetypes phased systems save/load
// Create a world with systems
const world = new World();

world.registerComponent('Transform', {
  position: [0, 0, 0],
  rotation: [0, 0, 0, 1],
  scale: [1, 1, 1]
});

// Spawn 100K entities
for (let i = 0; i < 100000; i++) {
  world.spawn('Transform', 'Physics');
}
04

Rendering Pipeline

15 passes, one frame

Shadow atlas, bloom, ACES tonemapping, volumetric smoke, half-res particle composite, scene-wide debug visualization, and temporal super-resolution upscaling. All GPU-driven.

shadow atlas bloom tonemapping TSR/FSR debug viz
// Frame pipeline (simplified)
1.  Camera matrices + frame uniforms
2.  Entity mesh rendering (instanced)
3.  Grid + SDF colliders + cloth/rope
4.  Particle rendering (volumetric SDF)
5.  Depth copy → scene debug visualizer
6.  Shadow atlas (4096² unified depth)
7.  Half-res particle composite
8.  Distortion + SPH fluid surface
9.  Bloom → ACES tonemap → TSR upscale
05

Procedural Audio

Physics becomes sound

30+ synthesis nodes, visual node-graph patch editor, physical modeling, and real-time material-to-sound mapping. Fire crackles from thermal simulation. Rain generates sound from impact velocity.

node graph physical modeling spatial audio material mapping
// Audio patch: fire crackle
{
  "nodes": [
    { "type": "noise", "color": "brown" },
    { "type": "bandpass", "freq": 2400 },
    { "type": "envelope",
      "attack": 0.001, "decay": 0.05 },
    { "type": "gain",
      "modSource": "thermal.intensity" }
  ],
  "spatial": { "falloff": "inverse" }
}
06

GPU Physics Engine

Full simulation on the GPU

Rigid bodies, vehicles, character controllers, FEM soft bodies, CCD, triangle mesh and heightfield collision. 15 WebGPU compute modules running entirely on the GPU with no CPU readback.

rigid bodies soft body vehicles CCD heightfield
// GPU physics dispatch
@compute @workgroup_size(64)
fn broadphase() {
  // Spatial hash for O(n) pair detection
  let cell = hashPosition(body.pos);
  for (neighbors in cell) {
    if (aabbOverlap(body, neighbor)) {
      addPair(body.id, neighbor.id);
    }
  }
}

fn solve() { // PGS constraint solver
  for (iter 0..8) { solveContacts(); }
}
07

Chemistry & Substances

Matter behaves like matter

A full periodic table, substance registry, and reaction engine — all GPU-driven. Particles carry chemical identity, temperature, and phase state. Fire oxidizes fuel. Water extinguishes. Acid corrodes. Reactions are data-driven and composable.

PeriodicTable SubstanceRegistry reactions phase transitions SubstanceMixer
// Define a combustion reaction
SubstanceRegistry.register({
  id: 'wood',
  density: 600, heatCapacity: 1.7,
  ignitionTemp: 300,
  reactions: [{
    reagent: 'oxygen',
    product: 'ash', byproduct: 'smoke',
    heatRelease: 18500, rate: 0.08
  }]
});

// Phase transition: liquid → gas
if (p.temp > substance.boilingPoint) {
  p.substance = 'steam';
  p.vel += thermalExpansion(p.temp);
}

Start Building

Zero install. Pure ES modules in a browser. Open a tab, build a universe.

Open Editor Playground Read Docs GitHub