Skip to content

Commit 407a5b4

Browse files
wormeymanclaude
andcommitted
Port phase 5: Vulcanus spawn, biomes and elevation (#225)
Completes the chain to vulcanus_elevation. Ports vulcanusSpawn.ts, vulcanusBiomes.ts and vulcanusElevation.ts, and closes the vulcanus_temperature the climate layer deferred, since it reads vulcanus_elev and could not be ported until that existed. Tier 1 grades fourteen more fields as frozen exact f32 match counts. Every one was measured again on the TypeScript side against the same fixture and all fourteen agree, so they are the distance both ports sit from the game: spawn, of 410 startingArea 371, startingCircle 247, ashlandsStart 61 biomes, of 434 mountain_volcano_spots 359, mountains_raw_volcano 163, mountains/ashlands/basalts_biome_full 128/107/127, mountains/ashlands/basalts_biome 403/402/408 elevation, of 434 elev 113, elevation 113, temperature 196 Three readings worth keeping. The oracle cannot see the -500 clamp, and that was checked rather than assumed. vulcanus_elevation is max(-500, elev), and the captured elev bottoms out at -58.77 - so the two columns are the same field at all 434 positions, 0 of 434 differ, and a port that dropped the max would score 113 as well. Both are graded anyway because they separate for free the day a capture reaches a deep lake, and the clamp's real test lives in the module, where it constructs the case the fixture does not. The clamp flatters a count, now measurably. The three clamped biomes score 403, 402 and 408 against their own unclamped sources at 128, 107 and 127. Same quantity, times two, clamped: nothing improved between them, the clamp saturates at 0 or 1 over most of the map, and a saturated position is exact for free. The *_biome_full row is the port's real score. A discrete output scores like a discrete output. mountain_volcano_spots at 359 is the highest unclamped count in the Vulcanus port, and it is dominated by which single candidate survives per region - a choice a sub-ULP error almost never changes. That is the same property CLAUDE.md records for voronoi_cell_id. Elevation's worst residual is 1.332e-1, which is only alarming until the scale is read: the field spans -58 to +1024 here, so it is about 1.3e-4 relative, the same order as every layer upstream. An absolute bound would need re-tuning per field for scale alone, which is a third argument for counting matches. Notes on the port itself: - vulcanus_biomes keeps a real cache, unlike every layer so far. raw_spots at one point reads selected spots from up to four neighbouring regions, which is cross-position state, so the region cache is a RefCell<BTreeMap> and eval stays &self. BTreeMap rather than HashMap because a determinism-critical port should not carry a container with unspecified iteration order, even where nothing iterates it yet. - volcano_area is evaluated at every spot candidate and pulls the whole pre-volcano chain there. The TypeScript memoizes those; this recomputes them. Nothing on the render path reaches this layer yet, so it is correct-first by choice, and the note says to measure before that changes. - The mountains pre-volcano split is a named method rather than an inline local. Collapsing the two stages would be an infinite recursion, which announces itself, but reading volcano_area off the POST-volcano raw would not. - Three numbers in spawn are transcription traps and each has its own test: basalts_start's distance is a bare 250 where both its siblings scale by r, mountains takes half the distortion coefficient of the other two, and the three results carry different multipliers. - min(a, a) in vulcanus_ashlands_func is transcribed as written. The two basis calls are byte-identical in the Lua, so it is the identity, and a test says so - collapsing it later should be deliberate. - cliff_elevation is a separate entry point because multisample's offsets are in the CONSUMING program's grid units: the cliff generator's 4-tile lattice moves the field 16 tiles for a dx of 4, which #83 measured. All seven Vulcanus tier-1 tests were watched going red under --features poison. engine.wasm is unchanged and still byte-matches its source. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2wz8eFazisYuENEkmBvvG
1 parent 791c4b7 commit 407a5b4

6 files changed

Lines changed: 1507 additions & 0 deletions

File tree

crates/fmw-noise/src/expressions/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ pub mod fulgora_scrap;
1515
pub mod fulgora_shared;
1616
pub mod fulgora_stack;
1717
pub mod starting_spot_at_angle;
18+
pub mod vulcanus_biomes;
1819
pub mod vulcanus_climate;
1920
pub mod vulcanus_cracks;
21+
pub mod vulcanus_elevation;
2022
pub mod vulcanus_helpers;
2123
pub mod vulcanus_seed;
24+
pub mod vulcanus_spawn;

0 commit comments

Comments
 (0)