# /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. ## `RoundTripHarness.tscn` The blueprint format regression test (script: `Tools/Scripts/RoundTripHarness.cs`). Run it headless from a terminal — it never generates, it round-trips an existing blueprint through the real parser and v2 writer and asserts semantic equality: ``` Godot --headless --path res://Tools/Scenes/RoundTripHarness.tscn ``` Defaults to the preserved reference blueprint (`user://reference_1409879727/`); override with the `HARNESS_V1_PATH` / `HARNESS_V2_PATH` environment variables. Exit code 0 = pass. ## 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.