Development Plan
Roadmap
18 milestones completed. Ongoing expansion of generators, tooling, AI integration, and format capabilities.
✓ Completed Milestones
WorldConfig, WorldMap, ZoneType, RegionType
JSON config loading, grid-based zone/region assignment, chunk coordinate system, world seed infrastructure.
Mc3SceneBuilder + MC3Writer
Safe C++ API for constructing MC3 scenes. addBox, addCylinder, addPlane, addGround, addInstance, setMetadata.
MaterialRegistry — ~100 built-in materials
Full material catalogue with RGB, roughness, category, and license metadata. CLI tool MeshWorldMaterials.
20 built-in chunk generators
ApartmentBlock, Beach, Bridge, Cave, Crossroad, Desert, Empty, Forest, Jungle, Meadow, Mountain, Ocean, Park, RiverBank, Road, ShopStreet, SmallHouseBlock, Square, Swamp, Tundra.
ChunkPipeline + ChunkCache
File-based disk cache, cache-first generation skip, Lua-first → C++ fallback dispatch.
MC3Validator
XML well-formedness, metadata presence, bounds checking, material name validation. ValidationResult with error list.
LuaRuntime + LuaSandbox
Lua 5.4 + sol2 integration. Sandboxed execution blocking io/os/debug/require. Scene API binding.
LuaGeneratorRegistry + 17 Lua generators
Auto-discovery from generators/lua/. Park, forest, crossroad, road zones; bench, chair, door, fountain, fridge, lamp, table, trash_can, tree, tv, window objects; simple_house building; kitchen room.
TaxonomyRegistry + ContainmentRuleRegistry
Node hierarchy from taxonomy.json. LOD-aware containment rules from containment.json.
SqliteContentPack + ContentPackLoader
Pack and load all generators, taxonomy, materials, and styles into a portable .sqlite file. MeshWorldPack CLI tool.
StyleRegistry + BuiltinStyles
Named style system mapping style strings to parameter sets. central_europe_small_city and others.
MeshWorld, MeshWorldMap, MeshWorldExport
World info dump, ASCII zone map, bulk chunk export. MeshWorldExport --mcb flag for binary output.
TextureRegistry
Texture entry registry (groundwork for atlas support in future milestones).
GenerationMetadata + ProceduralWorldGen
Structured metadata for generation context. ProceduralWorldGen utility class for seeded deterministic generation helpers.
Mc3DocumentBuilder
Higher-level document builder wrapping Mc3SceneBuilder for programmatic MC3 construction outside of generators.
Mc3MeshBuilder + Mc3Renderer + FPCamera
CPU tessellation of MC3 primitives to triangle meshes. First-person camera. SceneRenderer integration (guarded by MESH_WORLD_HAS_RENDERER).
WorldStreamer + WorldRenderer
Real-time chunk streaming around player position with configurable load radius. LOADED/UNLOADED callbacks. 127/127 streaming tests pass.
Interactive 3D viewer + MainMenu
Standalone MeshWorldApp binary with WASD + mouse look, live chunk streaming, main menu system. Built on CNA (SDL3/OpenGL).
◇ Planned Work
Buildings, Rooms, Zones
New Lua generators covering: shop (ground floor + signage + door + windows), warehouse (large box + sliding door), living room (sofa + coffee table + TV + bookshelves), bedroom (bed + wardrobe + nightstand), bathroom (toilet + sink + bathtub).
New zones: desert, jungle, beach, square (paved + fountain + benches), shop_street (facades + sidewalk + lamps).
Lua City & Settlement Maps
High-level map generators: lua.map.basic_city (city block layout using containment rules) and lua.map.desert_outpost (small settlement in desert zone).
Richer Built-in Generators
- ForestGenerator: TreeClusterGenerator, BushGenerator, ClearingGenerator, PathGenerator
- CrossroadGenerator: auto-detect 3-way vs 4-way from EdgeExits
- ParkGenerator: integrate Lua bench + lamp + tree via LuaGeneratorRegistry
- SmallHouseBlockGenerator: vary house sizes from variation seed
- ApartmentBlockGenerator: vary floor count from variation seed
- RiverBankGenerator: add water plane + reeds + stones
- BridgeGenerator: add railing boxes along edges
MeshWorldExport Flags + New Tools
MeshWorldExport --threads N— parallel chunk generationMeshWorldExport --force— ignore cache, regenerate allMeshWorldExport --validate— run MC3Validator, print errorsMeshWorldValidate— standalone validator binary for mc3.xml filesMeshWorldGLB— convert mc3.xml → glb via MeshCraft toolingMeshWorldMap --region— show RegionType instead of ZoneTypeMeshWorldMap --chunk X,Y— highlight a single chunkworld.local.jsonoverride support — merge into world.json at load time- Progress callback in ChunkPipeline for CLI progress bar
Claude & OpenAI Adapters
AI-assisted chunk generation — disabled by default, no keys committed. Bring your own API key via config/ai.local.json (gitignored).
- PromptBuilder — builds generation prompt from ChunkContext
- AIProvider abstract interface:
generate(prompt) → string - AnthropicAdapter — calls Claude API
- OpenAIAdapter — calls OpenAI API
- Retry logic: 3 retries, then procedural fallback
- MC3Validator integration: AI output validated before use
- ChunkContext
ai_requestedflag — only trigger AI when set - Test: AI disabled by default → C++ generator runs, no crash
Texture Support in MC3 Format
Add texture atlas support to the MC3 format and MaterialRegistry. Materials gain UV coordinates and atlas tile references. MeshCraft viewer updates to display textures.
Terrain from External Data
Import heightmap data (PNG greyscale or raw float array) to generate terrain chunks. WorldConfig gains a heightmap field. Useful for real-world terrain recreation.
Smooth Zone Transitions
Detect adjacent zone types and blend materials at chunk borders. Forest → meadow chunks get a gradual tree density decrease. Ocean → beach → desert chains blend naturally.
Level-of-Detail Chunk System
Generate chunks at multiple LOD levels. Far-away chunks use low-detail (few primitives) versions. Near-field chunks use high-detail. ContainmentRuleRegistry drives LOD transitions.
Run in the Browser
Emscripten build of the core library and CLI tools. WebAssembly target allows MeshWorld to run in-browser for demos, world previews, and web-based editors.
Multiplayer-Ready Worlds
Deterministic generation guarantee across platforms and C++ standard library implementations. Shared seed → same world on any machine. Foundation for cooperative multiplayer exploration.
Task Breakdown