Terrain

2D heightmap-based elevation model with contour visualization for road placement and site grading.

Design-TimeEngine & ToolingTransport

Implementation Status: Core prototype complete (2026-08-18). Heightmap + GPU-driven CDLOD terrain mesh (zero CPU vertex/index rebuilds, static patch geometry displaced from an R32Float heightmap texture), semantic layers, GPU water-flow compute, contour and slope visualization, road grade evaluation, and cut/fill grading cost all implemented and tested under game/src/engine/terrain/, with live rendering wired into main scene. Frustum culling runs as a WebGPU compute pass over the CDLOD quadtree, writing visible instances into an indirect draw buffer with zero CPU overhead. Terraforming brush strokes (raise/lower, level, smooth) dispatch as GPU compute and are undoable through the survey history stack. Solid 30+ fps at high-altitude (2.4km) camera views over the full 5.12km×5.12km map. Erosion simulation, tunnels, and seasonal flooding remain post-launch.

Data Model: Hybrid Heightmap + Semantic Layers

Surface: A 2D heightmap grid where each cell stores elevation (float). This is the primary renderable geometry — roads, buildings, and camera place against this surface. Same efficiency and authoring simplicity as SimCity 4 / Cities: Skylines.[1]

Semantic data layers: Alongside the heightmap, maintain additional per-cell grids capturing terrain attributes that influence simulation and gameplay. Each layer is computed from the heightmap and player edits via GPU compute shaders:

Sub-surface sparse voxels (future): A sparse 3D voxel grid under the heightmap stores volumetric terrain data: soil/rock type, cut/fill history, utility lines, and (post-launch) tunnel geometry. Cut/fill operations update both the heightmap (visual surface) and the sub-surface voxel grid, propagating changes to all dependent data layers.[1]

Editor Visualization

Slope Range Classification Planning Suitability & Road Limits Target Color
0% – 5% Flat / Optimal All intensive development; suited for Highways (max 8%) and Collectors (max 10%). Green (hsl(140, 70%, 45%))
5% – 10% Moderate Standard residential/commercial; Collector limit (10%) and Local streets (max 12%). Yellow (hsl(50, 95%, 50%))
10% – 15% Challenging Marginal development requiring grading; Alley limit (15%) and Unpaved (max 20%). Orange (hsl(28, 95%, 52%))
15% – 20%+ Severe / Critical Steep slope ordinances; road grade violations, high earthwork and erosion hazard. Red (hsl(0, 80%, 55%))

Road Interaction & Grading

Road placement and geometry are constrained by terrain and its semantic layers:

Computation & Rendering

References

Post-Launch Features