Square wall corners hold grains, liquids and gas (t39)
Powder, liquid and gas no longer step diagonally between two solid cells; flyers and diagonal tube intakes obey the same corner. World generation settles with the rule off, so seeds make the same worlds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -98,6 +98,14 @@ Details and numbers live in the code and in `docs/systems/`.
|
||||
|
||||
## Decisions
|
||||
|
||||
- **Square corners hold grains (t39, 2026-10-26).** The owner wants square wall staircases to
|
||||
hold material instead of leaking through each touching corner. Powder, liquid and gas cannot
|
||||
step diagonally between two solid neighbours; powder neighbours still allow free piles to
|
||||
slide as before. Free flyers and diagonal screw intakes obey the same solid-corner boundary.
|
||||
Screw lane transport is unchanged. World generation disables cell corner sealing while
|
||||
settling loose ground, preserving existing seed layouts. This supersedes the square-wall
|
||||
leakage described in the t36 decision below.
|
||||
|
||||
The newest are at the bottom. The dates are when the decision was made or built.
|
||||
|
||||
**Up to 2026-10-19** (early design, stated by the owner): everything in "What the owner wants"
|
||||
|
||||
+5
-4
@@ -230,10 +230,10 @@ Exploration only: never changes grains or the random stream.
|
||||
- functions: fogAlloc, fogMark, fogSeen, fogInit, fogLook, fogRevealAround, fogRevealAll
|
||||
- variables: FOG, FOG_SENSE, FOG_SENSE_FADE, fog, FW, FH
|
||||
|
||||
### src/sim/cells.js (207 lines)
|
||||
### src/sim/cells.js (208 lines)
|
||||
Cell helpers (setCell, move, enter) and the falling-sand movement of powders, liquids and gases (simMove).
|
||||
- functions: setCell, swapCells, move, enter, powder, passable, liquid, gas, wakeBotPowder, simMove
|
||||
- variables: SORTP, SORTP_FUEL, LSTEP, LFILM
|
||||
- variables: SORTP, SORTP_FUEL, LSTEP, LFILM, CORNER_SEAL
|
||||
|
||||
### src/sim/heat.js (265 lines)
|
||||
Heat: conduction, melting and freezing, reactions, fire and air, steel.
|
||||
@@ -264,7 +264,7 @@ Pipes, pumps and outlets: each joined line holds one liquid as a count, not as g
|
||||
Per-tick machine work: steam engines, fans, belts, filters, screw tubes (machinesTick).
|
||||
- functions: engineIntake, fanBlow, machinesTick
|
||||
|
||||
### src/sim/conveyors.js (201 lines)
|
||||
### src/sim/conveyors.js (202 lines)
|
||||
How belts, filters and screw tubes move what is on or in them. What rests on a belt or filter rides along: the whole stack standing on the carrying surface steps one cell toward d together (belts run front of the line first, so the way ahead is clear). If a powder grain is blocked, the load above it stands still and the belt slips underneath. A filter's own material drops through it instead, unless it is already full.
|
||||
- functions: conveyorStep, carryColumn, holdSlopeColumn, beltDrain, launchGrain, rebuildFilters, filterCarry, carryBeltsAndFilters, setFilter, filterRun, roomFor, tubeSpread, tubeIntake, diagonalTubeNext
|
||||
- variables: CARRY_DEPTH, filterR, filterL, filtersDirty
|
||||
@@ -297,7 +297,7 @@ Trees (background layer), acorns, saplings, and waking freezing water.
|
||||
- functions: cutTree, treeHeld, findTreeBases, treeSupportTick, woodRoom, treeFall, coldTick, plantTick, setTreeCell, saplingTick, igniteTree
|
||||
- variables: treeBases, saplings, treeDraw
|
||||
|
||||
### src/sim/vacuum.js (176 lines)
|
||||
### src/sim/vacuum.js (179 lines)
|
||||
The vacuum, blowing grains out, grains in flight (flyers), and the flame tool. Material the vacuum would start on at the cursor: a bar, else the nearest loose grain.
|
||||
- functions: vacuumTargetAt, toolVacuum, nozzle, toolBlow, flyOpen, depositNear, bagTemp, landFlyer, flyTick, toolIgnite
|
||||
- variables: blowRR, FLY_G, FLY_Q
|
||||
@@ -514,6 +514,7 @@ The frame loop and boot.
|
||||
- `test/t_basics.js`: Basics: drilling to rubble, the vacuum and blowing, walls, the ingot mold and bars, belts, blueprints, save/load.
|
||||
- `test/t_build.js`: Building: undo (Ctrl+Z), cut, replace a machine with Ctrl, pasting ghosts, and the fan heat warning.
|
||||
- `test/t_conveyors.js`: Screw tubes that never carry liquid (it flows through), tube and belt throughput, filters.
|
||||
- `test/t_corner_seal.js`: Corner-touching square walls seal loose grains without changing free piles or worldgen.
|
||||
- `test/t_diag_tubes.js`: Diagonal screws: sealed four-lane corner transfers, bars, joins and persistence.
|
||||
- `test/t_drill.js`: The resonance drill: pulses from the bot shake rock until it shatters. Widths trade area for speed, tuning shatters only one material and drains it out of the wall, built blocks are left alone, and the drill says why when nothing breaks.
|
||||
- `test/t_econ.js`: Economy: the dock (instant sale), orders, prices, the market dip, money for machines, alloys.
|
||||
|
||||
@@ -4,6 +4,34 @@ What agents have done, newest first. Add an entry for every piece of work: the d
|
||||
note or request it was for, what changed, the files touched, the tests run, and anything left
|
||||
open or not verified. Keep each entry short; the git history has the details.
|
||||
|
||||
## 2026-10-26: t39: seal touching square-block corners (Codex)
|
||||
|
||||
- `cells.js`: six inline checks reject diagonal moves between two PH_SOLID neighbours, with
|
||||
no new random calls. `worldgen.js` saves/disables/restores CORNER_SEAL alongside LSTEP/LFILM
|
||||
while settling. No material ids, save fields or piece geometry changed.
|
||||
- Reproduced two further leaks: free flyers (`vacuum.js`) and diagonal tube mouths pulling sand
|
||||
between external walls (`conveyors.js`); blocked those steps only. Horizontal liquid scans
|
||||
already check each intervening cell; vacuum collection removes grains into the bag. Bars
|
||||
resolve ordinary movement by axis. Screw lane transport remains explicit and unchanged.
|
||||
- `test/t_corner_seal.js`: 23 checks, including both staircase orientations for sand/water/steam,
|
||||
all four diagonal intakes, a flyer, world hashes/flag restoration, and an open pile that remains
|
||||
57x17 with identical material layout and random state when sealing is disabled.
|
||||
- All 25 headless suites pass. Before/after outputs: `t_slopes` square-funnel outflow 379 -> 339
|
||||
(more sand retained on steps); `t_drill` ore outside the wall 56 -> 55 (solid corners hold ore);
|
||||
`t_world` awake chunks after 900 gameplay ticks following reload 148 -> 149 (different settling
|
||||
after corner blocking). Disabling the checks restores drill/world baseline output exactly.
|
||||
Other existing output is identical except timings. Evidence: /tmp/t39-before, /tmp/t39-after.
|
||||
- Full mat/temp/flags hashes match original code for seeds 777/77/4242 at 512x384 and 2048x1024,
|
||||
plus 424242 at 1024x640 (/tmp/t39-world-hashes-{before,after}.txt).
|
||||
- Factory benchmark at 1024x640: idle 0.69 -> 0.68 ms/tick; 1/4/8 modules
|
||||
2.05/2.36/2.65 -> 2.13/2.44/2.70 ms/tick. Timing is indicative: settling changes, and this
|
||||
fixture reported zero machine-moved grains, so it does not prove loaded transport performance.
|
||||
- Rebuilt dist and regenerated PROJECT_MAP. Inspected `shots/t39-corners.png` in pixel look:
|
||||
sand rests along the upper steps and pours through the central outlet.
|
||||
- Final `python3 test/run_all.py --browser`: ALL PASSED (25 headless suites, 323 play checks,
|
||||
15 smooth checks). Updated t39 subtasks/report for Review and recorded the design decision.
|
||||
No commit made; owner playtest remains.
|
||||
|
||||
## 2026-10-25: t40 art pass: sloped belts and filters drawn as one belt (Claude Code, Codex)
|
||||
|
||||
- Sloped runs draw as the flat belt (rollers, studs) or filter (tinted mesh) band turned to 45°,
|
||||
|
||||
Reference in New Issue
Block a user