TL;DR: Over 26 focused build iterations since late October, we built a standalone C++17 voxel engine behind a plain C ABI, wrapped it in pure C# runtimes and a thin Unity adapter, styled six distinct worlds purely from JSON data, and shipped the first story-driven gameplay loop in our game Dusk Synth. Here is the honest dev log of what works today, the measured numbers, and the iteration roadmap ahead.
The Premise: Build the Core Once, Data-Drive the Worlds
Voxel games spend almost all of their budget in tight loops over 32 x 32 x 32 chunks: greedy meshing, chunk streaming, raycasts, terrain generation, and colored light flood-fills. Writing two separate copies in C++ and C# doubles maintenance and creates subtle drift. Keeping those loops locked inside one game engine makes portability painful later.
Our rule from iteration 1 followed the same boundary we use in multi-engine architecture: put the hot math and world state in one dependency-free C++17 library behind a flat C99 ABI, then put pure C# bindings, deterministic gameplay state, and thin engine adapters on top. We pair that with zero-allocation C# patterns on the Unity side so per-frame updates never stall the render loop.
Everything visual and interactive lives in versioned documents (voxel-blocks.v1, voxel-volume.v1, voxel-terrain.v1, voxel-style.v1, voxel-pois.v1, voxel-items.v1), so creating a whole new biome or encounter means authoring JSON rather than branching engine code. Every change in C++ is checked against golden test vectors and a standalone Python oracle so bit-exact bugs show up as failing numbers before anyone opens an editor.
Six Worlds From One Generator
The strongest payoff of keeping styles out of engine code showed up in iterations 20 through 22. Swapping a single JSON style document transforms the same generator and prop placement rules (roof, lot, facade, sidewalk, scatter, lift, footing, submerge) across six completely different moods:
lift rules, waterfalls, rope bridges, and marble ruins.
footing and submerge: "only" rules under a low coral sun.
The 26-Iteration Dev Log
We run development in focused, short-context iterations backed by structured handoffs (the same discipline covered in Thread Cost and Context Window Compression). Here is how the project moved from an empty chunk grid to playable objectives:
| Iterations | Dates | What Shipped |
|---|---|---|
| Iters 1-4 | Oct 27 - Oct 30 | Standalone C++17 core (32^3 palette chunks, AO-safe binary greedy mesher, DDA raycast, deterministic terrain, golden vectors + Python oracle), C99 ABI, C# bindings, LZ4 VXR1 region persistence, Unity Mesh.SetVertexBufferData adapter. |
| Iters 5-7 | Oct 30 - Oct 31 | Multi-platform native plugins (build_plugins.py for macOS, iOS, Android with 16 KB page alignment, Windows, Linux, WebAssembly), worker-thread streaming, and full 16-bit sky + RGB block light with per-channel color mixing. |
| Iters 8-13 | Oct 31 - Nov 09 | Swept AABB movement and flight, seamless passthrough voxel clouds and weather, vaporwave dusk atmosphere, animated neon pulses + URP post stack, hash-placed voxel-volume.v1 prefabs, Blockbench-style sub-voxel detail boxes (boxes), pulsing visor flashlight, Chrome WebGPU + WebGL 2 builds at 60 fps, reactive synthwave music. |
| Iters 14-19 | Nov 10 - Nov 16 | Per-box collision and raycasting, frame-time benchmarking tools, outrun/vaporwave menus, and runtime streaming optimizations eliminating main-thread hitches. |
| Iters 20-22 | Nov 18 - Nov 20 | iOS + Android mobile validation (tested on Pixel 9a), floating virtual touch controls, day/night keyframes, camera mood presets, stylized surface grain/bevel shader pass, offline style_preview.py renderer, and all six playable worlds + WORLD picker. |
| Iters 23-26 | Nov 22 - Nov 24 | Pure C# PoiWorld state/interaction/wave engine, voxel-items.v1 inventory + weapons + loot drops, The Static enemy invasion loop where reclaiming POIs restores neon and music stems, and X1 authored encounter sequences (first_signal, vars, conditions, zones, save/resume, poi_lint.py). Verified by 50 POI + 43 Item dotnet tests, 104 EditMode tests, and 48 PlayMode tests. |
Turning Scenery Into Gameplay: The First Signal Slice
In iterations 23 through 26, Dusk Synth got its first playable game loop built around restoring lost signal towers against The Static (noise entities like Saw Stalkers, Sine Wisps, and Feedback Sappers). Taking back a tower lights up the block neon, boosts mood, and unlocks the next layer of the synthwave track, applying the feedback loop ideas from Game Design Principles for Happy Players.
voxel-pois.v1 and voxel-items.v1.
The entire 7-step opening sequence (first_signal: shard pickup -> gated Radio DJ talk -> avenue ambush trigger zone -> Power Node repair -> 45s Signal Tower hold -> Bass Cannon build) runs in a pure C# fixed-timestep simulation with Save and Load persistence, so unit and integration tests can walk the full quest arc deterministically.
Measured C++ Core Numbers
From the core benchmark on an Intel i9-9900K desktop (macOS, chunk radius 8, 1,024 chunks loaded / 512 stored, caves enabled):
| Stage | Measured Result |
|---|---|
| Chunk memory footprint | 4.6 MB palette-packed vs. 32 MB raw (6.9x smaller) |
Region disk compression (VXR1 + LZ4) |
0.9 MB vs. 6.0 MB uncompressed (60 ms save, 80 ms load) |
| Terrain generation | ~0.55 ms per chunk (~0.27 ms with coarse caves.grid) |
| Greedy meshing | ~0.15 ms per chunk single-threaded; 512 chunks in ~15 ms on thread pool |
| Greedy quad reduction | 520k merged quads vs. 1.28M unmerged (2.5x reduction) |
| Raycasts & edits | ~2 us per ray; 10,000 random edits touched 382 chunks and remeshed in ~30 ms |
| Flight streaming (60 Hz, 4 ms budget) | Game-thread update p50 1.4-1.7 ms, p95 4.2-4.8 ms (measured under machine load 12-20) |
Note on full-game frame timings: while WebGPU and WebGL 2 builds hit 60 fps in Chrome and mobile profiling started on Pixel 9a, we are waiting for clean, isolated release-profile captures before publishing final end-to-end game frame-time tables.
Iteration Roadmap: What Comes Next
Every upcoming iteration stays broken into testable vertical slices:
| Milestone | Status | Scope & Target Slice |
|---|---|---|
| X1: Experience Sequences Core | Shipped (Iter 25-26) | Variables, conditions, invisible trigger zones, objective sequences with HUD compass/arrow, tagged spawns, Save/Load, poi_lint.py, and the 7-step First Signal arc. |
| X2: World-Changing Set Pieces | Up Next (Iter 26+) | Volume anchors, layer-by-layer animated prefab reveals (placePrefab, swapPrefab, clearBox), world pickups and collectible sets. Target slices: The Neon Bridge crossing the canal and the 5-part Lost Tape Hunt. |
| I3 & X3: Gear + Presentation Beats | Planned | New gear (Arp Repeater, Tuning Fork, B-Side Key), camera focus/shake, dialogue cards, slowmo, music-beat-aligned enemy rounds, victory fireworks, and Blackout Drop / Bitcrusher boss health phases. |
| P3 & X4: Authoring Tools & Side Encounters | Planned | In-game prefab and POI sequence editors, -sequence / -step test jump flags, debug variable overlay, and rule-scattered Busker Camp side encounter templates. |
vxnet: Multiplayer Over WebRTC + RUDP |
Designed (Sandbox Live) | Sans-IO RUDP transport in C++ (1200-byte MTU, ~10-byte edits, LZ4 chunk snapshots) over a single unordered zero-retransmit WebRTC DataChannel with listen-host then dedicated-server authority. Explore the packet protocol live in our Voxel-Net RUDP Sandbox. |
| Cross-Engine Adapters | Planned | Expose the existing WebAssembly build through a three.js viewer, followed by a Godot GDExtension and Unreal spike. |
References & Related Posts
- Architecture & Performance: Multi-Engine Architecture: Unity, Unreal, Godot, Web, Zero-Allocation C# in Unity
- Game Design & Workflow: Game Design Tips for Happy Players, Thread Cost: Capture-Then-Clear Handoffs, Context Window Compression
- Live Protocol Lab: Voxel-Net Sans-IO RUDP + WebRTC Sandbox
- Underlying Format Standards: glTF 2.0 Coordinate Frame, MagicaVoxel
.voxSpec, LZ4 Block Format, Sponge Schematic Specification