The game as of artifact version 24, ready for local development with coding agents. - Source split from three large files into 52 small ones under src/sim, src/render and src/ui, joined in the order in src/manifest.json by build.py. The joined code is unchanged apart from comments; every headless suite gives the same output, and screenshots in both looks are pixel-identical to before. - Light tidying with no change in behaviour: one movement scan loop, shared hazard-stripe and belt shader helpers, unused code removed, a shared check helper for the test suites. - World files can be exported as an ordinary download outside claude.ai. - Tests: broken old scripts removed, experiments moved to tools/, test/run_all.py added. Tools: shot.py (repeatable screenshots), where.py, map.py. - Docs: AGENTS.md, CLAUDE.md, NOTES.md (the owner's to-do inbox), docs/PROJECT_MAP.md, DESIGN.md, TESTING.md, systems notes, the owner's requests and an agent log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K9kLmYADKSEjuwUN3rFxDA
15 lines
1.2 KiB
JavaScript
15 lines
1.2 KiB
JavaScript
// The stone and sand machines: a half-full silo with its gate open over a belt, a stone cutter
|
|
// fed with rubble, and cut stone and glass brick walls. Run clear-sky.js first, e.g.
|
|
// python3 tools/shot.py /tmp/stone.png --setup tools/scenes/clear-sky.js --js "$(cat tools/scenes/stone-uses.js)" --ticks 240 --zoom 7
|
|
const bx = BX + 1, by = BY - 7; // the silo is 6 blocks tall; its gate pours onto a belt a block below
|
|
placeMachineAt('silo', 0, bx, by);
|
|
const silo = machines.find(m => m && m.type === 'silo'); silo.sm = RSTONE; silo.sn = 2300; silo.open = true;
|
|
for (let k = bx - 2; k <= bx + 10; k++) placeBlock(BP_BELT, 1, k, BY, true);
|
|
placeMachineAt('cutter', 0, bx + 14, BY - 3);
|
|
for (let k = bx + 12; k <= bx + 22; k++) placeBlock(BP_BELT, 1, k, BY - 1, true);
|
|
for (let y = (BY - 3) * 4; y < (BY - 3) * 4 + 5; y++) for (let x = (bx + 14) * 4 + 2; x < (bx + 14) * 4 + 6; x++) setCell(y * W + x, RSTONE, AMB[y], 0);
|
|
bag[BARSB] = 40; bag[BARGL] = 20; bagTotal += 60;
|
|
for (let k = 0; k < 4; k++) for (let j = 0; j < 3; j++) placeBlock(BP_WALL, BARSB, bx + 26 + k, BY - j, false);
|
|
for (let k = 0; k < 2; k++) placeBlock(BP_WALL, BARGL, bx + 31 + k, BY, false);
|
|
window.CAM = [(bx + 16) * 4, (BY - 4) * 4];
|