Coarser windows, a crust that stays up, and getBlocks in the right order - #17
Merged
Merged
Conversation
--stride averages n x n source pixels into one block, so a window can cover
ground it could not afford at full resolution: Hadley Rille and the Apollo 15
landing site now fit in one contiguous 2.96 x 1.48 km map at 4 m per block.
--rows makes the window a rectangle, since the interesting axis is often only
one of them.
Four bugs, all of which produced something that looked fine:
* Nodata was masked AFTER averaging, so one -3.4e38 pixel in a 2x2 block
gave -8.5e37 -- no longer equal to the nodata value, so every later test
for it failed, and it built as a hole 1e35 times deeper than the crater.
* The crust was a flat thickness. It needs to cover the drop to the lowest
neighbour, which is a per-column quantity: max(1, drop) costs 274k blocks
where a flat 5 cost 1.37M, and closes 671 columns of holes that the flat
one left open on the rille walls, where the deepest drop is 81 blocks.
* The Moon's top three soil layers were concrete powder and Mars's top two
were red sand. Blocks are placed with physics off -- deliberately, since
running physics for half a million placements is what got the server
killed by the watchdog -- so a floating crust never learns it is
unsupported. Break one block and the update spreads and the landscape
drains away. It did. A crust now uses only blocks that stay put.
* The Lunar Module's legs stepped in x and z at once, so consecutive iron
bars touched only at an edge. Bars decide what to join by looking at their
four faces, so the legs rendered as loose rods hanging in the air.
And in the client, getBlocks reshaped the reply into slabs of xSize * ySize.
The server sends Y outermost, then X, then Z -- RaspberryJuice's order since
2014, so the wire format stays as it is -- which makes a slab xSize * zSize.
Only correct when the box is as tall as it is deep, which is why it survived:
every value returned was a real block from somewhere in the box.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Kq1Cjkh3bVT1WLzh5FRVQG
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.
--strideaverages n×n source pixels into one block, so a window can cover ground it could not afford at full resolution — Hadley Rille and the Apollo 15 landing site now fit in one contiguous 2.96 × 1.48 km map at 4 m/block.--rowsmakes the window a rectangle.Four bugs, all of which produced something that looked fine:
-3.4e38pixel in a 2×2 block gave-8.5e37— no longer equal to the nodata value, so every later test for it failed, and it built as a hole 10³⁵ times deeper than the crater.max(1, drop)costs 274k blocks where a flat 5 cost 1.37M, and closes 671 columns of holes the flat one left open on the rille walls, where the deepest drop is 81 blocks.Plus a client bug:
getBlocksreshaped the reply into slabs ofxSize*ySize. The server sends Y outermost, then X, then Z — RaspberryJuice's order since 2014 (b16a04a), so the wire format stays — making a slabxSize*zSize. Only correct when the box is as tall as it is deep, which is why it survived: every value returned was a real block from somewhere in the box.236 tests.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Kq1Cjkh3bVT1WLzh5FRVQG