Repository navigation
Follow-ups: multioctave fields, temperature and ore radius in f32 (#521) - #533
Conversation
The game stores octaves' persistence and output_scale as f32 fields and computes 1/P with divss (NoiseOperations::MultioctaveNoise::run, 2.1.23). octave_terms used the f64 values unrounded. Narrow both first. Tier 1 (only these moved, all on Vulcanus; every other planet unchanged): vulcanus_rock_huge 303 -> 433 of 434, vulcanus_rock_big 297 -> 432, rock density 421 -> 432. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1cBoAGaJ1FoYPm6arC
temperature_basic is clamp(15 + bias + noise, -20, 50). The game folds 15 + bias, then adds the noise in f32. Temperature::eval returned an unrounded f64 and the tree layer rounded it where it read it. Round each step in Temperature and drop the tree layer's now-redundant f32r. Tier 1: no count moved (trees stay 442 of 442). The bias-shift unit test tolerance went from 1e-9 to one f32 step at the field's scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1cBoAGaJ1FoYPm6arC
vulcanus_resources used the f64 0.7 * 0.75 for its spot distances while the biome layer already used the f32 constant the game holds. Tier 1 (out of 1085): starting coal 974 -> 1085, starting calcite 969 -> 1085, starting sulfur 1050 -> 1085, coal region 1043 -> 1063, sulfuric acid region 1039 -> 1053, sulfuric acid region patchy 1040 -> 1054. No count went down. The spot-query raw-bits fold was re-frozen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1cBoAGaJ1FoYPm6arC
60 rows moved, all in fields these follow-ups change: - nauvis: 6 rows (temperature, now rounded at its source) - primitives:multioctave: 1 row (persistence and output scale as f32) - vulcanus: 53 rows (the rock fields and rock noise, the starting ores and their regions, metalTile, and four tiles that read them) No Fulgora or Aquilo row moved, no key was added or removed, and no render pixel count against the game moved. The full vitest suite passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1cBoAGaJ1FoYPm6arC
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
Stack 5 of 5 for #521, reopened as a new PR. This replaces #530, which is the same branch. #526 to #529 are merged, and this branch is rebased onto
mainat 1be2643. A GitHub API outage left #530 showing the pre-rebase head, and GitHub will not reopen a PR after a force-push.Three small fixes that the first four PRs turned up. Each is its own commit.
1. Multioctave persistence and output scale in f32
A read of the 2.1.23 binary (
NoiseOperations::MultioctaveNoise::run, file 0x25222b0) shows the game stores persistence and output scale as f32 and computes 1/P with an f32 divide.octave_termsused them as f64. Values like 0.55, 0.6 and 0.85 round differently. Only Vulcanus rocks moved:vulcanus_rock_hugevulcanus_rock_big2. Nauvis temperature rounded at its source
Temperature::eval_atnow rounds15 + bias + noiseone step at a time before the clamp, as the Lua writes it. The tree layer had rounded temperature where it read it. That rounding is gone, and the trees stay at 442 of 442. No tier-1 count moved, so this one is ungraded. It matches the Lua.3. Vulcanus ore spots use the f32 starting-area radius
startingCoalstartingCalcitestartingSulfurcoalRegionsulfuricAcidRegionsulfuricAcidRegionPatchyThe shared spot query's frozen fold is re-frozen.
Checked and left alone
1/24input scale is already right. It goes intobasis_noise_expras an input scale, which narrows it and multipliesf32(x) * f32(scale), the game's form.128 / grid / 20and similar) are several f64 steps rounded once. Rounding each step in f32 moved no count, and at the default grid of 175 the values are bit-identical. It could only matter at non-default sliders, which no fixture covers, so it was reverted.Checks
cargo test -p fmw-noise --lib: 538 passed.scripts/verify-rust.sh: passed.pnpm vp check: clean.engine.wasmrebuilt. Tier 2: 60 rows (Nauvis 6, the multioctave primitive 1, Vulcanus 53). No Fulgora or Aquilo row moved.pnpm vp test: green. No render pixel count against the game moved.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kd6o1cBoAGaJ1FoYPm6arC
Summary by CodeRabbit