Physics test pass for sand, molten metal and gases; stuck gas finishes, steam is not deleted (t21)

- New test/t_physics.js: heaps, sorting, sinking, world edges; molten copper levelling, setting,
  quenching, slag over copper, cavity filling; smoke, steam, fire, sealed pockets, the top row.
- Gas in a sealed pocket kept its area asleep and never faded or condensed: gas() keeps its area
  awake while it lasts.
- A rain drop or blown grain landing on steam deleted the steam's water: it goes to the clouds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-24 21:55:04 -04:00
co-authored by Claude Opus 5.5
parent 9291040ff0
commit f678165e1b
5 changed files with 240 additions and 4 deletions
+3 -2
View File
@@ -226,7 +226,7 @@ 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 (187 lines)
### src/sim/cells.js (189 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, simMove
- variables: SORTP, LSTEP, LFILM
@@ -293,7 +293,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 (166 lines)
### src/sim/vacuum.js (172 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
@@ -472,6 +472,7 @@ The frame loop and boot.
- `test/t_fog.js`: Fog: surface, sight, range, saves and simulation independence.
- `test/t_furnace_repeat.js`: The starter furnaces keep working when fired again and again without cleaning, however the charge goes in: mixed, ore first with coal on top, or blown in through the vent. Each case plays furnace_play.js, which builds the design and fires it like a player.
- `test/t_molds.js`: Molds and furnaces stay usable: ingots drop below and keep their stubs, plugs over molds are cleared, spoiled castings can be knocked out, grains never drop through a grate by teleporting, and slag lets the fire breathe.
- `test/t_physics.js`: Sand and other powders, molten metal and gases: heaps, sorting, sinking, setting, rising and fading. Water has its own suite (t_water.js). Tall worlds keep geothermal heat out of the way.
- `test/t_pipes.js`: Pipes, pumps and outlets move liquids; the Grinder grinds waste rock for trace ore.
- `test/t_racks.js`: Rack intake, FIFO storage, gate, removal and saved-state validation.
- `test/t_smooth.py`: The smooth look: the WebGL pass compiles, draws, falls back cleanly, and the thermal lens still works.
+15
View File
@@ -4,6 +4,21 @@ 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-24: t21 phase 2: physics test pass for sand, molten metal and gases (Claude Code, Codex)
- `test/t_physics.js` (41 checks): heaps, digging under a heap, ore sorting through ash, sand
sinking in a pond, world edges; molten copper levelling (slower than water), setting, sinking in
a pond, slag over copper, filling a cavity; smoke rising and fading (longer under a roof), steam
condensing, fire going out, gas in sealed pockets, gas leaving at the top row. Every scenario
checks that its areas go back to sleep.
- Found and fixed: gas stuck in a pocket never finished fading or condensing because its area
slept (`gas()` keeps its area awake: steady cost 1.34 -> 1.37 ms/tick); a rain drop or blown
grain landing on steam deleted that steam's water (`landFlyer`/`depositNear` in
`src/sim/vacuum.js` now send it to the clouds).
- Found, owner decided: a resting pile never sorts. To follow: piles near the bot keep sorting,
and sorting gets quick.
- Tests: `run_all.py --browser` ALL PASSED; seeds 777 and 77 generate the same worlds.
## 2026-10-24: t21 phase 1: water test pass, faster pouring, rain spreads (Claude Code, Codex)
- `test/t_water.js` (20 checks): conservation, levelling and sleep, pools pouring off ledges,