B2: Grid building and placement preview
Server-authoritative grid building with wall, floor, ramp, roof and breakwater pieces in driftwood, stone and salvage iron, plus a client placement ghost. - StructureSet: pieces in grid slots (floor, two wall edges, cell volume), their collision boxes in SimGround, and touching-neighbour links kept up to date for B3. Ramps are stairs of 0.4 m steps; walls over lower ground get a skirt down to the terrain; roofs are a low stepped pyramid. Pieces are part of the state hash. - Building: target() snaps look and position to a slot, and check() validates any slot as if a hostile client chose it: state, range, occupancy, trapping a player, cost and support. Fire in build mode places at most 10 pieces a second; players in a low step are lifted. - Levels are half a cell (2 m) apart, so ground pieces sit within a metre of the builder's feet instead of being half buried. - Client: StructureView draws pieces from their boxes in plank, course or panel strips; ramps draw as a sloped deck. BuildGhost shows sea green or rust red from the same target() and check(). - Tests: 15 sim tests (targeting, every rejection, overlap, support, stairs climbable, skirts, determinism, 24 builders at 10 pieces a second within the tick budget) and 5 client tests (ghost states, ghost agrees with the server, view sync, mesh orientation). - Capture scenarios build_fort and build_fort_side. Closes #16 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://test/capture/build_scene.gd" id="1"]
|
||||
|
||||
[node name="CaptureBuild" type="Node3D"]
|
||||
script = ExtResource("1")
|
||||
Reference in New Issue
Block a user