Deepgrain Foundry: move from a claude.ai artifact to a local repository

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
This commit is contained in:
2026-10-23 16:05:31 -04:00
co-authored by Claude Opus 5.5
commit 3f971a94c2
100 changed files with 11928 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// A clear work area left of the bot's starting point (the trade dock is to its right): open
// sky 160 grains wide and 40 tall, over a flat stone floor. Money and a bag of building
// stuff to build with. Sets FLOOR (the first row of the floor), BX, BY (the leftmost block
// of the area that stands on the floor) and CAM (the middle of the area).
money = 50000;
const x0 = Math.max(4, SX - 170), x1 = SX - 10, y0 = SY - 40;
window.FLOOR = SY + 40;
for (let y = y0; y < FLOOR + 8; y++) for (let x = x0; x < x1; x++) {
const i = y * W + x;
bgm[i] = 0;
setCell(i, y >= FLOOR ? STONE : EMPTY, AMB[y], y >= FLOOR ? F_NAT : 0);
}
// open sky down to the floor (the renderer draws cave wall behind empty cells below surfY)
for (let x = x0; x < x1; x++) { surfY[x] = FLOOR; dirtY[x] = Math.max(dirtY[x], FLOOR + 8); }
updateRoof();
window.BX = Math.ceil(x0 / 4) + 1; window.BY = Math.floor(FLOOR / 4) - 1;
bag[RSTONE] = 400; bag[RBRICK] = 200; bagTotal = 600;
window.CAM = [(x0 + x1) / 2, SY + 20];