A procedural terrain generation tool built using Zig and raylib. Create unique, beautiful islands with real-time controls and advanced simulation features.
- Multi-Layer Procedural Generation: Uses a combination of Continental, Island, and Detail Perlin noise layers to create organic archipelagos.
- Advanced River Simulation: Features hydraulic logic including:
- Meandering Paths: Natural winding based on terrain slope.
- Lake Filling: Rivers realistically fill depressions and "spill" over to continue their path.
- Dynamic Widening: River width increases downstream, with deep-water centers for larger flows.
- Hex-Staggered Rendering: A unique staggered grid layout providing a high-quality "hex-like" visual aesthetic.
- Real-time UI: A custom-built UI system with sliders, buttons, and informative tooltips for every parameter.
- Interactive Map:
- Zoom & Pan: Smooth navigation around the generated terrain.
- Dynamic Legend: Clear visual guide for all 7 terrain types.
- Export: Save your creations directly to high-quality
.pngfiles.
- Left Mouse / Right Mouse / Middle Mouse: Click and drag to pan the camera.
- Scroll Wheel: Zoom in and out of the map.
- [R] Key: Quickly regenerate the map with current settings.
- UI Sliders: Tweak noise scale, octaves, island radius, falloff, and more in real-time.
Ensure you have the latest Zig compiler (tested on 0.15.2+) installed.
- Clone the repository.
- Run the following command in the project root:
zig build run
src/main.zig: Application entry point and main UI loop.src/core/map.zig: Core map data structures and rendering logic.src/gen/: Procedural generation algorithms (Island and River).src/ui/: Custom UI framework with tooltip support.
