islaApocalypse/Tools/Scenes/README.md
beezm d72ffc0183 docs: bring all READMEs current with actual code (post-sweep-10 truth pass)
Every README was read first, checked against the code in its directory, then
rewritten to describe what the code actually does now.

Corrected throughout: map size is config-driven (8192 default) not a fixed
4096; chunks are 24x24x256 not 32x32; road carving is implemented for all four
tiers, not a 'next step'; Data/ and Resources/ are empty, not populated.

Also fixed MATH_MARCHING_CUBES.md, which documented the density sign convention
exactly backwards — it claimed positive was underground, where the code treats
positive as above the surface and counts a corner inside when density < iso.
Getting that backwards inverts every normal, a bug this project has hit before.

The root README now carries accurate run steps: F5 runs the map generator (not
the game), F6 on Scenes/Main.tscn runs the 3D world, and ChunkRadius is a load
radius that should be dropped to 4-8 while iterating.

Docs only. No code changed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-05 05:23:58 -04:00

37 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# /Tools/Scenes — developer environments
Standalone scenes used to run the offline generation scripts. **Never add these to a game export.**
## `MapPreview.tscn`
The 2D map generator itself.
- **Root:** `TextureRect` · **Script:** `MapGenerator.cs`
- Runs the noise maths, builds the heightmap and biome map, plots the A\* road network, writes the
`.dat`, and draws the map via `_Draw()`.
**This is the project's main scene** (`project.godot` → `run/main_scene`). That means **pressing
F5 anywhere in the project runs this**, regenerating the world and overwriting your `.dat` — it does
not start the game. To view the 3D world, open `Scenes/Main.tscn` and press **F6** instead.
## `MapCaptureTool.tscn`
*(Lives in `/Scenes`, wraps this directory's scene.)* A `SubViewportContainer``SubViewport`
(4096×4096) → `MapPreview`. It exists purely to render the map offscreen at full resolution: Godot's
UI layout engine would otherwise scale a 4096-pixel render down to the editor window, producing a
tiny or black PNG.
Note the generator writes the `.dat` on its own — the capture wrapper only matters for the
full-resolution image.
## Generating a new world
1. Open `MapPreview.tscn` (or `Scenes/MapCaptureTool.tscn` for the full-resolution PNG).
2. Press **F6***Play Current Scene*.
3. **Expect minutes, not seconds**, and expect the editor to be unresponsive. The A\* road stage is
the slow part and can stall long enough to be worth abandoning; watch the console for
`[A*] 1/4 … 4/4` progress. See `/Tools/Scripts/README.md`.
4. On success the console prints the export path. Files land in `user://`
`~/.local/share/godot/app_userdata/islaApocolypse/`.
**Then update `ServerConfig.json`'s `WorldSeed`** to match the new `.dat`, or the 3D scene will fail
to load it.