gigaslop/CLAUDE.md
type-two 50298b8932 Art glow-up: all 23 hardware sprites regenerated on CF flux-1-schnell
1024px, heavily detailed component prompts (greebles, braided cables,
status LEDs, dust and scratches, neon rim light on dark charcoal) with
a shared style tail for consistency, cut with MB bg_remove_local and
autocropped. Manifest in tools/sprites.tsv, pipeline in tools/cf_cut.py.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-01 21:29:44 +10:00

111 lines
6.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# GigaSlop — project notes for Claude
## What this is
Satirical AI-datacenter tycoon game. Web-first: TypeScript + Vite + PixiJS v8.
Design doctrine: **the sim stays engine-agnostic**`src/sim/` must never
import from `src/render/` or `src/ui/` (a future Godot/Steam port swaps the
renderer only). Fixed 10 Hz tick, deterministic (seeded rng in state, no
Date.now/Math.random inside sim).
## Dev loop
- `npm run dev` on :5173 (`.claude/launch.json` has the preview config).
- The Browser-pane tab is usually `visibility: hidden` → RAF doesn't fire.
The sim is pumped by setInterval on purpose; don't move it back into RAF.
- `window.__giga` = debug handle {state, scene, place(), wire()} for
JS-driven playtesting. Keep it working — automation depends on it.
- All balance tunables live in `src/sim/balance.ts`. Tune there, nowhere else.
## Art pipeline (CF flux + MODELBEAST)
- **Hardware sprites (current set): Cloudflare flux-1-schnell** — free ~10k/day
credits. `FLUX_ENV=~/Documents/fluxgod/.env FLUX_W=1024 FLUX_H=1024 node
~/Documents/90sDJsim/tools/flux.mjs tools/sprites.tsv <outdir>` (prompts live
in tools/sprites.tsv — keep the shared style tail for consistency), then
`python3 tools/cf_cut.py <outdir>` (MB bg-removal + autocrop into
public/assets/gen). CF occasionally drops a job — re-run flux.mjs (it skips
existing) and re-cut the stragglers.
- **Deploy gotcha (learned the hard way): ALL runtime asset URLs must be
RELATIVE** (`assets/...`, never `/assets/...`) — the game serves from
/games/gigaslop/ on monsterrobot.games. Verify live with a SCREENSHOT of the
canvas, not just asset 200s.
## Art pipeline (MODELBEAST)
- `python3 tools/mb_gen.py [--only room|objects|slop]` regenerates art on the
farm (queue http://100.89.131.57:8777, token from ~/Documents/backnforth/.env).
Deterministic seeds from asset slug — same slug, same image.
- Object sprites: flux_local → bg_remove_local (background:"transparent") →
autocropped in place (PIL alpha-bbox, 8px pad). If you regenerate, re-crop.
- Room/grid registration: `src/render/iso.ts` (TILE 82x41, ORIGIN 510,346)
is hand-fitted to `public/assets/gen/room.png`. New room image = refit
constants (toggle the Grid overlay to check).
- Slop thumbnails are intentionally AI slop; titles in src/data/sloptitles.json
(Ollama on m4pro was down at bake time; hand-authored — regenerate via
tailnet Ollama when it's back if more are needed).
## Roadmap (agreed with John 2026-08-01)
✅ M1 art-forward Tier-1 slice (save/load, naming, SFX)
✅ M2 platform-decay treadmill: platformAdapt rises per publish, throttles all
view rates (up to 85%), tier-up grants relief — verified loop: publish →
squeeze → train → relief. Infra: 20A sub-panel (+1500W), fiber uplink
(1Gbps/8 ports), Cash Furnace (burns $1.5/s for +40% views; John's idea,
keep it — endgame R&D tree should have a literal cash-conveyor upgrade).
✅ M3: VC rounds (Seed→C) with views-delta mandates — fail = -25% cash and
permanent equity dilution; rival CEO events (Doomsworth/Hypeman/Freeman
Weights/Poogle) on a seeded timer with timed view/price effects and a
60/40 CLAP BACK gamble. Seed goal calibrated empirically: decisive play
≈48K views/8min, goal 40K, idle ≈12K.
✅ M4 skill trees (src/sim/research.ts is the single source of truth; sim
reads one computeMods() bundle — add nodes there, never special-case sim):
• Model Lab (L): gen ladder is now bought from the training bank; modality
branch (voice→image→video→A/V, richer = more views but pricier videos);
one exclusive spec per gen (engagement/stealth/efficient, cleared on
gen-up); data source own/scraped/licensed — own rolls 35% MODEL COLLAPSE
(half revenue + all-gibberish titles for that gen), scraped attracts
lawsuits, licensed bills per token.
• Corporate R&D (R): perk point per closed VC round + cash; Ops/Growth/
Legal branches; capstones Diesel Backup (grace+auto-reset, no checkpoint
corruption), THE CONVEYOR (10% gross income burned, +50% views),
Regulatory Capture (lawsuit immune, 2x adapt decay).
• Sockets: click device → inspector panel (stats, on/off, sell, 2 upgrade
slots: fans/undervolt/risers).
✅ M5 model line + API market: player names their model at incorporation
(versions 1/1.5/2/3 = the old tier ladder); ship grades mini/pro/MAX
from the training bank (margin/demand/distill-risk per grade, GRADES in
research.ts); 3-way compute split train/host/slop (allocHosting);
rotating third-party market (rollMarketModel), hot drops crater
incumbent margins ~28%; hosting your own grade rolls distillation
(margin cut 60% that version — re-ship on a newer version to restore
the moat); scraping ops cash ladder (puppeteer→proxies→botnet→captcha)
vs severity-1..3 IP-ban outages. Market panel = M key.
✅ M6 hardware depth: GPU cards (GPUS in catalog.ts, 11 parody cards
P106→BigChungus) install into carrier slots (PC=1, rig=4, half-rack=8
+rackClass for datacenter cards); carriers have no intrinsic tok —
cards provide tok/watts/VRAM/heat. VRAM totals gate ALL token output
vs the running version's needs (TIERS vramGB, floor 0.25). Storage
devices (shoebox/NVMe/NAS) gate training checkpoints (TIERS
checkpointGB — training stalls without disk). Switch layer:
device→switch→uplink with per-switch Mbps caps (no daisy chains).
Shop has category headers. Old saves get equivalent card loadouts
(save.ts migration).
✅ M7: rooms are data (src/sim/rooms.ts — geometry hand-registered per
backdrop; iso.ts is room-aware via setRoomGeom; sim reads ROOMS[s.room]).
Garage move: $3k at $2.5k earned, 14x14, 2.4kW base. Thermal runaway:
packed carriers get +15% heat per extra card and throttling does NOT
reduce heat — sustained >95°C ignites (device + cards destroyed, fire
spreads heat, click flames to fight; CO2 extinguisher auto-douses one
fire within 3 tiles then is spent). Flaky used cards (p106/mtt_s80/
radish580) die under load. Ad-spend slider (log-diminishing hype) +
email Spam Blast (instant views, 60s cooldown, 15% blacklist risk).
✅ M8: warehouse tier (20x20, 8kW, MOVES ladder has from-fields now);
immersion tank (fire-immune carrier, card heat x0.15, 8 rack-class
slots) + CRAC unit + AIO socket; SaaS subscribers — signups from live
view rate (SAAS.CONV), churn on latency (serve demand > inference
share), collapse, and breaker trips (-15% instant); serving eats
inference tokens BEFORE the video pipeline. SUBS stat in HUD with
latency warning.
→ M9 backlog: ACTIVE scraping minigame, Conveyor belt visual,
per-carrier PSU, Tier 4 campus + strategic map layer, win/lose
states, sound design pass, Steam packaging decision.
Design pillars (John-approved framing): Throughput, Allocation, Attention,
Capital, Expansion. Macro layer (Tier 4-5) = strategic map, NOT city-builder.
Cut until earned: Tiers 35, immersion cooling, offshore ships, lobbying.