idleman
запушил(а) main в idleman/foodmageddon
ae09b96d64 feat(terrain): falling chunks (M2)
- DetachFinder: after each op, finds components no longer 4-connected to a
plate pixel. Each seed searches breadth-first on a small budget (meets
pixels already proved anchored), then depth-first downward.
- One sequenced terrain event stream (op, detach, merge) applied by the
server and every client; masks and patches are RLE-encoded.
- FallingChunk: dynamic planck body approximated with grid-aligned boxes
(chains never collide with chains). Tiny components crumble as debris.
- Resting chunks are rasterized back (inverse transform, no holes), glued
to the ground below; merges that would leave a piece hanging are
retried, diagonal-only crumbs are dropped from the patch.
- Chunks hitting a player hard enough crush them (respawn for now).
- Tests: detach rules, RLE, rasterization, boxes, tier fall and merge,
tilted landing, crush, and server/client bitmap identity by replay.
Known: a whole tier coming loose (~90k px) takes ~9 ms on the server,
above the 2 ms budget of readme §5 (noted in the roadmap).
No new dependency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d1c1e35c07 feat(characters): Castor Glouton, title menu and first art pass
- Castor Glouton (pulled forward from M5): bite that knocks back and stuns,
held special that burrows toward the cursor while there is cake to eat
(no flying), growth with every pixel eaten, slower when fat, the floor
gives way past heavySize, digestion back to base size. He eats chocolate.
- Character API: dynamic size, hits, velocity control, anim flags.
- Title screen (DOM): nickname and character choice with rendered portraits.
- Procedural art: tileable material textures, irregular felt-pen outline,
rim light, darker undersides, drop shadow, cavities showing the inside of
the cake, painted characters with walk cycle, squash & stretch, chewing
and stun stars, comic onomatopoeia, crumbs and dust, warm vignette,
freeze-frame on hits, camera leading toward the cursor, kitchen backdrop.
No new dependency.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
083d43faff chore: scaffold M1 (destructible terrain, authoritative server, tooling)
Project skeleton from readme.md: electron-vite + strict TypeScript, Electron
main/preload, a Node-only authoritative server (planck physics, ws +
msgpackr) and shared integer-only terrain code (material bitmap with 64 px
chunks, carve/fill/convert ops, marching squares, Douglas-Peucker, map
loader with validation, seeded RNG). The reference map gateau-etages is
generated by scripts/gen-test-map.ts. ESLint enforces the dependency rules
of readme §3 and bans Math.random in shared/ and server/.
Note: commits are a retroactive split by file of work done before the
repository existed. Files touched by several steps (game.ts, net.ts,
protocol.ts, constants.ts) are committed here in their final form, so this
commit does not build alone; the last commit of the series is the tested
state.
Dependencies:
- electron, electron-vite, vite, electron-builder: runtime, dev/HMR build
and Windows packaging, as specified in readme §2.
- pixi.js, planck, ws, msgpackr, vitest, typescript: stack from readme §2.
- pngjs: single PNG decoder for terrain.png on the server and in the main
process, so every machine gets bit-identical pixels (the browser decoder
may alter colors).
- tsx: runs the headless server (npm run server) and scripts without a
build step.
- eslint, @eslint/js, typescript-eslint, globals: npm run lint.
- @types/node, @types/ws, @types/pngjs: typings.
Versions are pinned to the newest majors compatible with each other
(typescript-eslint does not support TypeScript 6+ yet).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 недель назад