← Back
Home › Systems › Games

voxel-engine

voxel engine

Minecraft, Teardown

SystemTechniques · 9Primitives · 35 voxel-engine Work-stealing dequeconcurrency · medium: Per-worker deque: the owner pushes and pops at the bottom without contention, idle workers steal from the top; the core of Rayon, Tokio and Go.›Chunked voxel storagegraphics · medium: Fixed-size voxel chunks with palette compression and dirty trackingFrustum occlusion cullinggraphics · medium: Frustum tests on bounds, hierarchical-Z occlusion and GPU culling passesGreedy meshinggraphics · medium: Merge coplanar voxel faces into large quads to cut triangle countsMarching cubesgraphics · medium: Extract triangle meshes from scalar fields (marching cubes, dual contouring)Sparse voxel octreegraphics · medium: Sparse octrees and DAGs for compact voxel storage and ray traversalSequential impulse solverphysics · medium: Iterative contact solver applying impulses one constraint at a time with accumulated clamping and warm starting; the standard solver for stacking and friction in real-time physics engines.›Bit packing and PFORcompression · low: Store blocks of integers with exactly b bits each and patch rare outliers separately (PFOR); the fastest integer codec family, billions of values per second.›Run length encodingcompression · low: Run-length encoding of repeated values, often combined with delta and bit packingSpatial hashingphysics · low: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›Voxel ray traversal ddagraphics · low: Amanatides-Woo grid DDA to step rays through voxels for picking, shadows and collisionLZ4compression · low: Byte-aligned LZ77 with no entropy stage; compresses at hundreds of MB/s and decompresses at several GB/s per core, for when speed beats ratio.›GPU command buffersgraphics · low: Record GPU work as a flat list of commands on the CPU, submit it in batches, and reuse its memory through a ring of frames in flight guarded by fences.›Gradient noisegraphics · low: Perlin and simplex noise, fBm octaves and domain warping for terrain and texturesBFS and DFSgraphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.›Epoch-based reclamationconcurrency · low: Threads announce a global epoch while touching shared lock-free data; garbage retired in epoch e is freed once the epoch reaches e + 2.›Memory orderingconcurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.›Dictionary encodingcompression · low: Map values to small integer codes via a dictionary for compact, comparable columnsHomogeneous transformsgeometry · low: 4x4 affine and projective matrices, homogeneous coordinates, view and projection, normal matricesImage pyramidsgraphics · low: Gaussian/Laplacian pyramids and tiled multi-resolution images for zoom and blendingGPU compute shadersml-training · low: The vendor-neutral GPU launch model of Metal, Vulkan and WebGPU: a grid of workgroups, shared memory, barriers and subgroups, driven by recorded command buffers.›Bounding volume hierarchyphysics · low: Binary tree of nested bounding boxes; prunes overlap and ray queries to O(log n) for any size distribution, and supports cheap insert/remove for moving objects.›Finite differencesnumerics · low: Replace derivatives with weighted differences of grid values; simple stencils plus a stability condition (CFL) turn PDEs like heat, advection and waves into array loops.›+ 2 more techniques+ 19 more primitives

Similar systems

Share the most building blocks with this one.