Skip to content

Preview: a Fast / High accuracy setting (#589) - #592

Merged
wormeyman merged 2 commits into
mainfrom
fast-high-accuracy
Nov 28, 2026
Merged

wormeyman merged 2 commits into
mainfrom
fast-high-accuracy

Conversation

@wormeyman

Copy link
Copy Markdown
Collaborator

What this does

Adds one setting beside the preview, Accuracy: Fast / High, with Fast as the default. It is kept in src/store/ui.ts under fmw.accuracy and saved at once, like the Debug flag. Changing it redraws the picture on screen at the same seed.

  • High is the render the parity specs grade, unchanged: the window's chunks plus a ring of chunks, corrected with a margin.
  • Fast is "X1": the window's own chunks only, with no ring and no correction margin. Tile correction is most of an entity tile's time, and the ring and margin make a tile correct about 2.9 times its own area.

Only Gleba's and Aquilo's real-surface entity views read it (Gleba trees, resources, cliffs, enemies and all; Aquilo resources, rocks and all). Terrain and the other views draw the same pixels at both settings. Nauvis's real-surface path is not on main yet; it gets the same Fast mode in the next PR.

Under the preview, on views that draw entities (not terrain or elevation), a note in the panel's small caption style:

Entities match this map as the game first generates it.
Exploring in a different order can change some of them.

ABI v3

  • u32 accuracy at offset 56 of the common prefix (0 = High, 1 = Fast), then a u32 of padding, so the planet blocks stay 8-aligned.
  • COMMON_BYTES 56 -> 64, ABI_VERSION 2 -> 3. Every block moves by 8: Fulgora 128, Vulcanus 376, Aquilo 192, Gleba 152, Nauvis 584 bytes.
  • Any other value is a new status, BadAccuracy (7). The TypeScript writer refuses an unknown name.
  • An omitted accuracy encodes as High, so every spec that builds its own request still grades High. The app always sends its setting.
  • test/fixtures/wasm-request.v2.json is now wasm-request.v3.json. The Nauvis and Gleba arms are Fast, the other three High. Its bytes were checked again by test/fixtures/verify-wasm-request.py, which now checks the accuracy word and the zero padding word.

What Fast costs

Frozen in the parity specs, against the same real-surface fixtures, 1024 window, seed 123456:

planet, view Fast px High px
Gleba all, the map a player gets 1,730 5
Aquilo all 10 0
Aquilo resources 3 0
Aquilo rocks 7 0

Seams: Gleba's sixteen 256-pixel tiles differ from one Fast render of the window at 2,177 pixels (0.21%), and Aquilo's sixty-four 128-pixel tiles at 432 (0.04%). High stitches to 0 on both, as before. The terrain view is byte-identical at both settings on both planets.

These match the prototype's measurements exactly (Gleba nests arm 1,730; Aquilo 10, 3 and 7).

Planted breaks

  • Fast running High's reach: all six Fast counts go red, each to High's number (1,730 -> 5, 10/3/7 -> 0, both seam counts -> 0).
  • High running Fast's reach: 24 High tests in the Gleba and Aquilo parity specs go red.
  • A request writer that drops the field is caught by test/elevationRenderRequest.spec.ts, which reads the accuracy word the app's request mapping writes for each of the five planets.

Timing

The app's own preview (1024 x 1024, seed 123456, the Debug readout), headless Chrome with no DevTools client, hammond (16 threads, 15 workers). Median of 7, the three arms interleaved; main is 4ec759a.

planet, view main High Fast
Gleba all 1,091 ms 1,098 ms 568 ms
Gleba terrain 534 530 529
Aquilo all 344 338 162
Aquilo terrain 222 229 226
Nauvis all 910 918 915
Nauvis terrain 460 458 457

High is main's time, as it should be. Fast halves Gleba and Aquilo all. Nauvis does not move yet: its real-surface path comes in the next PR. Terrain is the same in every arm.

Gate

pnpm run verify:lint, the full pnpm vp test (120 files, 1,454 tests; the one a11y failure in that run was the new dropdown missing an aria-label, fixed and re-run green) and bash scripts/verify-rust.sh, all green locally.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c

wormeyman and others added 2 commits November 28, 2026 12:18
One global setting beside the preview, "Accuracy: Fast / High", Fast by
default, kept in the UI store under fmw.accuracy and saved at once. The
preview re-renders when it changes.

High is the graded real-surface render, unchanged. Fast places the
window's own chunks only, with no ring and no correction margin. Only
Gleba's and Aquilo's real-surface entity views read it; terrain and the
other views are byte-identical at both settings.

ABI v3: a u32 accuracy at offset 56 of the common prefix (0 High, 1 Fast)
and four bytes of padding, so COMMON_BYTES is 64 and every block moves by
8. An unknown value is the new BadAccuracy status. The round-trip fixture
is now wasm-request.v3.json, re-verified by verify-wasm-request.py.

Fast's frozen counts against the real-surface fixtures (1024 window):
Gleba all 1,730 px (High 5); Aquilo all 10, resources 3, rocks 7 (High 0).
Seams: Gleba 2,177 px over sixteen 256 px tiles, Aquilo 432 over
sixty-four 128 px tiles (High 0 on both).

The note under entity views: "Entities match this map as the game first
generates it. Exploring in a different order can change some of them."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c
@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 31260d7f-30f7-4493-8ab1-f0d186981893
Commits

Reviewing files that changed from the base of the PR and between ef2357e and 208f2e1.

Files ignored due to path filters: 1

  • src/noise/wasm/engine.wasm is excluded by !**/*.wasm
Files selected for processing: 21

  • CLAUDE.md
  • crates/fmw-noise/src/fixtures/aquilo_real_surface.rs
  • crates/fmw-noise/src/placement/aquilo.rs
  • crates/fmw-wasm/src/abi.rs
  • crates/fmw-wasm/src/native_parity.rs
  • crates/fmw-wasm/src/render.rs
  • docs/rust-wasm-port.md
  • src/components/ElevationPreviewPanel.vue
  • src/model/accuracy.ts
  • src/noise/preview/elevationRenderRequest.ts
  • src/noise/wasm/request.ts
  • src/store/ui.ts
  • test/elevationPreviewPanel.spec.ts
  • test/elevationRenderRequest.spec.ts
  • test/fixtures/PROVENANCE.json
  • test/fixtures/verify-wasm-request.py
  • test/fixtures/wasm-request.v3.json
  • test/uiStore.spec.ts
  • test/wasmAquiloRenderParity.spec.ts
  • test/wasmFulgoraRenderParity.spec.ts
  • test/wasmGlebaEntityParity.spec.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@claude

claude Bot commented Nov 28, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@wormeyman
wormeyman merged commit 669cab8 into main Nov 28, 2026
16 checks passed
@wormeyman
wormeyman deleted the fast-high-accuracy branch November 28, 2026 20:38
@wormeyman

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Action not completed

Pull request is closed.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 14 minutes.

@wormeyman

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Action not completed

Pull request is closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant