Modding / Inside the engine

Under the hood.
Room to build.

A practical look at Petramond’s Rust engine: how the world is simulated, how frames are rendered, and where your mods fit in.

petramond / workspace
L5petramond-clientapp · session · prediction
L4render + audiowgpu · shaders · spatial sound
L3petramond engineserver · simulation · networking · mods
L2worldgen + meshgeneration · worker-built geometry
L1petramond-worldregistries · chunks · blocks · light
L0math + utilitiessmall deterministic foundations
THE ARCHITECTURE

Different jobs.
Clear boundaries.

The crate graph is the boundary. Presentation can depend on the deterministic world core; the world core never reaches upward into a renderer or window.

01 / PRESENT

Native by default.

The desktop client uses winit and wgpu. Camera-relative world rendering, fog, colored block light, model animation, weather passes, and UI all meet in one frame graph.

client → render / audio
02 / SIMULATE

One authoritative tick.

Gameplay mutation belongs to the fixed simulation tick. The client consumes neutral presentation snapshots and predicts the local interactions that need to feel immediate.

client ⇄ server simulation
03 / BUILD

World data stays neutral.

Blocks, items, shapes, recipes, chunks, light, and registries live below both gameplay and rendering. Mesh and generation workers operate without owning the live world.

worldgen / mesh → world core
A Petramond mushroom cavern captured through the real offscreen renderer
IN-ENGINE CAPTURESeed 0x26AAC2880 × 1620 · cinematic lighting
FROM WORLD TO FRAME

Real worlds.
A cinematic lens.

The landscape is the game. The lighting is art-directed.

The capture harness streams generated terrain, settles the game's custom shapes and meshes, and renders through a local copy of Petramond’s wgpu frame graph. These website images use screenshot-only lighting, atmosphere and color grading; they do not represent the default gameplay visuals.

  1. 01
    GenerateSeeded terrain and installed pack hooks
  2. 02
    SettleLighting, custom shapes, meshes, and GPU uploads
  3. 03
    CaptureThe native renderer, without a window
ENGINE SYSTEMS

The foundations
you can build on.

The engine separates world data, simulation, and presentation so new content can grow without tying every system to every other one.

16³

Cubic streaming

Sections stream above, around, and below the player instead of treating the world as a flat stack of columns.

WGPU

Modern rendering

Terrain, water, models, particles, weather, and post-processing run through a native GPU frame graph.

TICK

Deterministic simulation

Defined ordering, seeded randomness, and an authoritative fixed tick keep gameplay state reproducible.

WASM

Sandboxed behavior

Mods use a bounded host API to add systems without receiving filesystem, wall-clock, or native process access.

DATA

Layered registries

Namespaced catalogs let packs add or refine blocks, items, recipes, mobs, sounds, models, and world features.

FAST

Parallel world work

Generation, lighting, and meshing happen in worker pools; the render thread drains bounded results and keeps moving.

PLAY FROM SOURCE

Build it.
Run it. Tinker.

You need Rust stable and a desktop GPU/driver stack supported by wgpu.

  1. 1
    Get the source

    Get the public source from GitHub.

  2. 2
    Build the packs

    Install the WASM target and compile the included mods.

  3. 3
    Launch the game

    Launch with a fresh world or a favorite seed.

terminal
$ git clone https://github.com/shinyvision/petramond
$ cd petramond
$ rustup target add wasm32-unknown-unknown
$ make mods
$ make run

# Start from a favorite seed
$ SEED=0x12345678 RD=24 make run
RustNative engine
wgpuGPU renderer
16³World sections
WASMMod runtime
MAKE THE WORLD STRANGER

Try a working content pack.

See the mod system