1.6 KiB
1.6 KiB
Architecture Notes
Proposed Rust workspace structure
Start simple, then split into crates when module boundaries stabilize.
src/terrain.rs: height grid, bounds, sampling, normals, terrain transforms.src/import/: importers for open/safe formats; historical compatibility later.src/scene.rs: camera, target, light, atmosphere, water, vegetation parameters.src/render/: CPU reference renderer first, then WGPU renderer.src/script.rs: parse and execute OpenVistaPro script commands.src/colormap.rs: palettes and elevation/biome color mapping.src/bin/openvistapro.rsor currentsrc/main.rs: CLI entry point.
Suggested technology choices
- Rust 2021 or newer.
clapfor CLI.serdeplusron/toml/serde_jsonfor scene files.imagefor PNG output and texture loading.nalgebraorglamfor vector/matrix math.wgpupluswinit/eguifor the eventual interactive app.gdalsupport should be optional because native GDAL dependency setup can be heavy.
Development strategy
- Build a deterministic CPU terrain renderer as a reference implementation.
- Add parsers/importers around open formats using tiny test fixtures.
- Add a scriptable CLI so CI can verify output dimensions/hashes/metadata.
- Add interactive UI only after terrain/scene/render core is testable.
- Add GPU renderer and advanced effects once CPU behavior is understood.
Compatibility strategy
OpenVistaPro should preserve workflow concepts first. Direct compatibility with old file formats can be added later only when it can be done cleanly and legally.