DS - Voxel Cutaway World Generator MVP Design
Version: 0.2.0
Date: 2026-03-08
Author: Rens Roosloot / Codex collaboration
1. Purpose
This document defines the design specification for the first implementation of the Voxel Cutaway World Generator described in URS.md and FS.md.
2. Implementation Strategy
- standalone page under
site/voxel-cutaway-world/ - browser-rendered 3D scene
- static-site compatible deployment
- client-side seeded generation
- no backend services
3. Technology Direction
Recommended direction:
Three.jsfor 3D rendering- plain JavaScript modules for generation and UI logic
Node.jsfor local development tooling only
The runtime should avoid unnecessary framework weight.
4. High-Level Architecture
Recommended runtime modules:
page bootstrapseed and parameter managerworld generatorvoxel mesh builderscene and lighting setupcamera controlsUI controlstheme manager
5. World Data Model
The world should be represented as a finite 3D block grid.
Recommended block categories:
- empty
- grass/top surface
- dirt
- stone
- water
- snow
- trunk
- leaves
- ore
- lava
Recommended design rule:
- hidden internal faces should not be rendered
6. Generation Design
6.1 Terrain
- use seeded noise or equivalent deterministic height generation
- produce moderate terrain variation only
- reserve lower regions for water
6.2 Biome-like Surface Rules
- grass/default top layer at moderate elevation
- snow at high elevation
- tree placement on stable surface positions only
6.3 Underground Rules
- top subsurface layer: dirt
- deeper layer: stone
- caves carved from underground volume
- ore clusters embedded in underground solids
- lava restricted to deeper levels
7. Scene Design
- floating chunk centered in open space
- default three-quarter elevated camera
- atmosphere/background kept subtle
- the chunk is the visual focal point
8. Lighting Design
Day mode:
- brighter ambient light
- one directional or key light
- clear shape readability
Night mode:
- lower ambient light
- cooler scene balance
- optional emissive treatment for lava
The lighting system should remain simple enough for mobile performance.
9. Interaction Design
- orbit control with constrained vertical angle
- bounded zoom distance
- touch gestures mapped to the same camera model
- regenerate action rebuilds world and recenters scene cleanly
10. Performance Design Notes
- keep chunk dimensions modest
- prefer a single merged mesh path per material class where practical
- avoid rendering hidden faces
- keep material count low
- treat shadows as optional and disable them if mobile performance suffers
11. Security and Deployment Notes
- no secrets in client code
- no third-party runtime scripts unless clearly justified
- all production assets and code remain within
site/ - generated content remains local to the client session
12. Suggested Implementation Sequence
- page shell and viewport
- static test chunk rendering
- seed-based block generation
- mesh generation for visible faces
- camera orbit/zoom for desktop and mobile
- day/night theme support
- regenerate flow
- visual polish and performance tuning
13. Traceability
URSinteraction requirements -> Sections 7, 8, 9URStechnical constraints -> Sections 2, 3, 11FSworld behavior -> Sections 5, 6FScamera behavior -> Section 9FSperformance expectations -> Section 10
14. Current Prototype State
Current implementation status in site/voxel-cutaway-world/:
- standalone public page exists
- seeded world generation is active
- live WebGL 3D rendering is active
- orbit/zoom interaction works on desktop and mobile
- day/night lighting toggle is active
Still to improve:
- mesh efficiency and geometry batching
- stronger material polish
- richer cave/ore/lava tuning
- optional move from vendored runtime files to a formal asset-copy workflow if the project grows