I want a hillside you can cross, dig into and build on, with another ridge waiting beyond it. VELD starts with generated terrain and layers player changes on top: excavation for caves and separate geometry for construction.
Generate the ground; store the changes
A generated heightfield describes the untouched landscape. A separate edit layer records where players excavate, allowing tunnels beneath the surface; placed geometry handles player-built walls and roofs.
From a smooth heightmap to a block-shaped cave.
Start at zero: the cliff is one continuous generated surface. Drag to excavate sideways. Only the opening and exposed cave faces become cell-shaped; the high roof still follows the heightmap. Switch to a surface pit to see the different effect.
Schematic side view: one excavation cell = one metre. The generated solid is queried against a sparse set of removed cells. Outlines show exposed cell boundaries, not a dense stored world. The roof is the untouched solid above the hole. This is geometry, not a structural-collapse simulation.
Why a deep tunnel leaves the hillside smooth
Click a column to position a dig. Adjust its height to see how nearby terrain can become block-shaped while higher ground stays smooth. The side view connects the excavation to the generated surface.
Side view of the selected row; horizontal spacing is enlarged for readability. The buttons below are height samples, not a voxel rendering of the world.
The displayed heights are illustrative. The local effect depends on both the dig and the generated surface; the diagram is not a copy of the production rule.
The first hole changes the surface nearby
When a dig meets a slope, nearby exposed terrain becomes block-shaped while the hillside above stays smooth. The rendered surface, shovel target and collision use the same result. Inside a cave, ground queries find the floor below the player instead of stopping at the hill overhead. The diagrams show both effects.
One continuous cave dig
20× TIMELAPSE · 3m45s of digging → 11.2s
The browser, worker and server share terrain rules for edits and surface queries. Saved changes are tied to the world generator so a later terrain revision cannot silently move the ground around old holes.
Storage follows the excavation
The first version kept several indexes for each edit. The current store adapts its representation as edits accumulate, reducing duplicate bookkeeping while keeping cave-floor and surface queries local.
Terrain payload: one comparable fixture
For a synthetic 32 × 32 × 128 sample region with 1,000 spread edits, VELD stores about 8 KiB of typed terrain data plus its height cache. These are representation-level estimates, not whole-engine or server-memory comparisons.
Minecraft estimates use 32 mixed 16³ sections at 4–8 bits per sample; uniform sections differ. The Roblox estimate follows its published 2017 row-packed model including mip levels; current storage may differ. Roblox supports runtime excavation. Payload excludes meshes, lighting, construction, networking and other engine state. Minecraft section constants · palette implementation · Roblox storage model · Roblox Terrain reference.
Measured VELD memory reduction
The adaptive store reduced retained excavation memory in both same-workload tests:
Median retained JavaScript heap plus ArrayBuffers across five isolated Node processes on Apple M4. Other game systems are excluded; this does not establish whole-server memory, FPS or player capacity.
A single edit can carry more fixed setup overhead than the previous store; that is a memory result, not evidence that digging is slower. Repeated collision and aiming queries improved in these runs, while general key lookup, enumeration and large chunk replies regressed.
One dig, then every nearby player
The server verifies and owns excavation. Nearby clients receive edits and rebuild affected terrain; returning players can catch up on changes they missed. Saves preserve excavations and ore discoveries across a restart.
Detail follows the shovel
Workers build terrain geometry as needed. The browser keeps the current mesh visible until its replacement is ready, and raises detail around nearby digs so a coarse hillside does not hide a cave mouth.
Where this design stops
Generated terrain can continue as you travel, though the current world coordinates have finite bounds. A heightfield suits landscapes; caves and buildings use separate layers.