classic-terrain

Generates deterministic procedural lunar terrain with craters, mare masks, and slope relaxation for classic-wgl.

1|1|Updated Aug 18, 2021
One-click install
npx skills add https://github.com/guilledk/classic-wgl --skill classic-terrain-guilledk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: classic-terrain
Source: https://github.com/guilledk/classic-wgl/tree/main/.agents/skills/classic-terrain
Command: npx skills add https://github.com/guilledk/classic-wgl --skill classic-terrain-guilledk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tuning or debugging procedural terrain in classic-wgl requires understanding a multi-stage generator where parameters like slope thresholds, crater density, and relaxation budgets interact in non-obvious ways, and mistakes silently break pathability or rendering. ## Core Features & Use Cases - Lunar surface generation: Covers the full generate_lunar pipeline — mare mask, regolith fBm, wrinkle ridges, age-ordered crater field, slope relaxation, landing zones, and corridor carving. - Noise and tileset tooling: Documents the fractal noise combinators (tiling_fbm_2d, domain warp) and the procedurally painted 8x8 tileset that must tile seamlessly. - Tuning and debugging workflow: Provides the dbg_lunar example, headless golden-frame rendering, regression tests, and a health-check table of expected stats for a 400x400 map. - Use Case: When a generated map has no impassable terrain or absurd cliffs, use this Skill to diagnose the relationship between max_slope, nav_max_slope, and build_max_slope and fix the upstream discontinuity. ## Quick Start Ask the AI to tune the lunar terrain parameters or debug pathability on a generated map, for example by running the dbg_lunar example with a seed and map size to inspect the stats.

Frequently Asked Questions about classic-terrain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I tune procedural terrain parameters in classic-wgl?

Run the dbg_lunar example with a seed and map size to print stats plus ASCII height, material, and navigation maps. For appearance changes, render a headless golden frame with CLASSIC_ROM=rom:lunar, then compare against the health-check stat ranges.

Why does my generated map have no impassable terrain or absurd cliffs?

The gap between nav_max_slope (0.62) and max_slope (1.15) is the chokepoint system; collapsing the two thresholds removes impassable terrain or creates cliffs. Keep max_slope as the relaxation-enforced ceiling and nav_max_slope as the walkability cut.

Why is the crater field flattening or inflating the whole map?

Rim and ejecta deposits must be combined with max via a deposit buffer, never summed, or overlapping blankets push the map into the height ceiling. Also check the excavation limit, since nested craters without it drag the global minimum down.

Does the terrain generator work on wasm and without a GL context?

Yes, the generator is pure, GL-free, and deterministic from a seed string, making it unit-testable without a GL context and safe on wasm32. The lunar generator runs inside a wasm guest module in classic-roms.

What are the limitations of the lunar terrain generator?

There is only one generator algorithm (lunar), no water or wind erosion, approximate ejecta rays, no secondary crater chains, and circular landing zones. Spawn points are single cells and the generator does not reserve building or resource sites.