islaApocalypse/Tools/Scenes
beezm c305fd6565 feat: blueprint v2 envelope — writer, dual-write, round-trip harness (terrain-water task 02)
v2 tagged-section container (D-030): raw ISLA magic + u32 version gate,
[u32 tag][u64 length][payload] sections — params (resolved generation
inputs incl. impact centre), heights f32, biomes u8, towns with the
highway-node flag, four road tiers identified by tag not position.

- BlueprintFormat.cs: the single tag/constant registry.
- BlueprintWriter.WriteV2: blueprint-typed, callable outside a
  generation run; generator and harness are both just callers.
- ExportMapData dual-writes: v2 under the primary seed name, legacy v1
  beside it as _v1.dat (safety net; removal is a future task).
- MapDataParser: LoadMapDataFromPath entry point; v1 parse body
  extracted intact as LoadV1 (v2 reader lands in the next commit).
- RoundTripHarness scene: load v1 -> write v2 -> load v2 -> semantic
  equality, headless, seconds per cycle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 07:24:08 -04:00
..
MapPreview.tscn baseline: working salvaged prototype on Godot 4.7.1 (pre-F1) 2026-08-05 01:45:41 -04:00
README.md docs: bring all READMEs current with actual code (post-sweep-10 truth pass) 2026-08-05 05:23:58 -04:00
RoundTripHarness.tscn feat: blueprint v2 envelope — writer, dual-write, round-trip harness (terrain-water task 02) 2026-08-06 07:24:08 -04:00

/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.godotrun/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 SubViewportContainerSubViewport (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 F6Play 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.