islaApocalypse/Data/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

41 lines
1.7 KiB
Markdown

# /Data
Intended handoff point for static world data written by `/Tools` and read by `/Server`.
## ⚠️ Currently empty
**This directory holds nothing but this README.** The generator does **not** write here.
Generated world data goes to Godot's `user://` path instead — outside the project entirely. On Linux
that is:
```
~/.local/share/godot/app_userdata/islaApocolypse/
MapData_Seed_<seed>.dat the blueprint (~512 MB at 8K)
Map_Seed_<seed>.png visual snapshot of the map
```
That is a good arrangement and worth keeping: it means a 512 MB blueprint can never be committed by
accident, and regenerating a world never dirties the repo.
## The blueprint format, for reference
`MapData_Seed_<seed>.dat` is custom binary, written by `MapGenerator.ExportMapData` and read by
`Core/Scripts/MapDataParser.cs`. Order is fixed and the two sides must match exactly:
1. `"ISLA_V1"` — length-prefixed magic string
2. map size (int32)
3. for every pixel, x-major: height (float32) + biome (int32)
4. town count, then per town: x, y (float32), tier (int32)
5. the four road tiers in order — Highway, Branch, Rugged, Trail — each as a path count, then per
path a point count and its x/y float pairs
**Enum ordinals are the serialized values** and there is no version gate beyond the magic string and
no range validation on read. See the warning in `Core/Scripts/README.md` before touching `Enums.cs`.
## If this folder ever does hold data
- **Data files only** — no scripts, no logic.
- **Keep large generated `.dat`/`.png` files out of git.** Commit only a deliberately chosen release
seed, if any.
- Live player saves and terrain edits belong in `user://`, never in the project folder.