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:
@@ -0,0 +1,25 @@
|
||||
// simTick: one simulation step, in order.
|
||||
// ---------- Main tick ----------
|
||||
function simTick() {
|
||||
tick++;
|
||||
tickStamp = (tickStamp % 255) + 1;
|
||||
if (tick % 20 === 1) updateRoof();
|
||||
weatherTick();
|
||||
machinesTick();
|
||||
pipesTick();
|
||||
pulseTick();
|
||||
entTick();
|
||||
if (flyers.length) flyTick();
|
||||
simMove();
|
||||
heatPass();
|
||||
for (let c = 0; c < NCH; c++) if (awake[c]) awake[c]--;
|
||||
if (tick % 15 === 0) checkMolds();
|
||||
if (tick % 30 === 0) checkLedger();
|
||||
if (tick % 60 === 7) plantTick();
|
||||
if (tick % 120 === 13) coldTick();
|
||||
if (tick % 20 === 9 && treeBases.length) treeSupportTick();
|
||||
dockTick();
|
||||
if (tick % 60 === 17) { marketTick(); ordersTick(); }
|
||||
if (tick % 30 === 11 && saplings.length) saplingTick();
|
||||
ghostTick();
|
||||
}
|
||||
Reference in New Issue
Block a user