Repository navigation
Nauvis: rocks and trees as a real surface places them (#16, slice 1) - #593
Merged
Merged
Conversation
At one tile per pixel the Nauvis trees, rocks and all views draw the rocks and trees a real surface places, through the game's per-chunk generator and the apply step, instead of a tree density blend and a salted rock roll. Other zooms are unchanged. - The stream, read from the prototypes at runtime: fish, huge-rock, big-rock and big-sand-rock (one group), 15 forest trees, 5 dead and dry trees, then the ores, spawners, worms, oil and uranium. - The five dead and dry tree probabilities are new; all 29 fields match calculate_tile_properties at 1,873 of 1,873 positions. - Fish stand on the tile corner (Positioning::Grid) and draw nothing extra. - Chunks apply in COLUMNS order: rows misplaces 6 of 33,481, each beside a chunk corner. - Whole 1024 window at seed 123456, later groups off: 33,481 of 33,481 at the game's positions; 0 of 1,048,576 pixels through the module. - Default map: 32,555 of 32,635 matched, 926 extra beside cliffs and on ore tiles (later slices). Frozen at 3,040 tree and 78 rock pixels. - all: 914 -> 1,220 ms in the app (median of 7). New fixtures from scripts/probes/nauvis-real-surface-entities, with PROVENANCE entries. engine.wasm rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c
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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c
Merge the Fast / High branch, and give Nauvis's real-surface path the same X1 reach: Fast places the window's own chunks with no ring and no correction margin. Frozen against the captures: trees arm trees 307 px, rocks 35, all 329 (High 0 each); default-map trees 3,341 (High 3,040); 256-pixel seams 1,273 (trees) and 155 (rocks). 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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c
|
Warning Review limit reachedYou'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 12 minutes. View limit details
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. |
Collaborator
Author
|
@coderabbitai full review |
Action not completed
|
Collaborator
Author
|
@coderabbitai full review |
Action not completed
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nauvis: rocks and trees as a real surface places them (#16, slice 1)
At one tile per pixel (the app's preview), the Nauvis
trees,rocksandallviews now draw the rocks and trees a real surface places, at the game's own positions. Before,treesblended a tree density over every pixel, androcksused a salted roll per overlay. Neither put anything at a real entity's position. Other zooms are unchanged.This is the first slice of #16. The spawners need it first: they sit later in each chunk's random stream than the fish, rocks and trees, so they can only be exact once every earlier group spends the right draws.
What the game does, and the port
trees/entities.rs). All 29 fields match the game at 1,873 of 1,873 positions.Positioning::Grid).Grades
test/wasmNauvisEntityParity.spec.ts):trees,rocksandalldiffer in 0 of 1,048,576 pixels from the game's entities painted on our terrain. 128- and 256-pixel tiles stitch to the whole render byte for byte.ResourceEntity::postSetup), and spawners in earlier chunks block trees.The planted breaks and the two gaps are in
docs/rust-wasm-port.md. The gaps: the dead trees' parenthesised tail is graded at tier 1 only, and the point kernel at integer corners places the same entities as the chunk grid.Re-frozen Nauvis counts
No existing frozen Nauvis count or digest moved. Every
nauvis:rendertier-3 row and every tier-2 fold is off one tile per pixel, so none of them reaches the new path.tiledEqualityAppGeometryand the app-plan seam tests now exercise it and still pass. The rock check inreal_surface_counts.rsstill grades the salted roll, which other zooms still draw, and a comment there says so. The new frozen values are: tree pixels against the default map, 3,040; rock pixels against the default map, 78; the replay windows, 1,134, 182 and 1,096; the seven controls; and the per-probability positive counts.Fast and High (#592)
Nauvis's real-surface path now reads the app's Accuracy setting too. High is the render graded above. Fast ("X1") places the window's own chunks only, with no ring and no correction margin, the same rule as Gleba and Aquilo. Frozen in
test/wasmNauvisEntityParity.spec.ts, whole 1024 window:trees, trees armrocks, trees armall, trees armtrees, the map a player getsSeams: sixteen Fast 256-pixel tiles differ from one Fast render at 1,273 pixels (
trees) and 155 (rocks). High stitches to 0. Terrain is byte-identical at both settings. All four counts match the prototype's measurements exactly.Cost
Measured in the app, Nauvis at seed 123456, headless Chrome with no DevTools client, 15-worker pool on hammond. Median of 7, the three arms interleaved;
mainis 669cab8 (#592).With the app's default (Fast), every Nauvis view is now as fast as main or faster. High costs +65% on
trees, +81% onrocksand +32% onall. Two things cost time there: the 23 fields at every land tile of the window and its ring, and correcting the ring's tiles. One cheaper option was measured and not taken: reading the ring's tiles out of the window's own correction. It broughtallto 1,154 ms against 1,340 ms in a noisier 5-run comparison, but it put 1 tree pixel wrong on the whole window. The module grew from 563,325 to 582,073 bytes.Plan for the rest of #16
EnemyBaseFieldwith the chunk penalty batch, the four worm probabilities, and apply against the trees and rocks placed here. In the default window there are 48 spawners and 47 small worms, and none is within 6 tiles of a cliff. The app shows 75 spawners today. Capture arm: cliffs off, resources on, withtree_removal_probability = 0in data-final-fixes, so the ores still draw but remove nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_01Kd6o1d34pJNr7M9RVWCV2c