Skip to content

[13/16] feat: save and refill at coffee machines - #144

Merged
arudaev merged 2 commits into
feature/39-chair-sweepsfrom
feature/43-coffee-save
Oct 24, 2026
Merged

arudaev merged 2 commits into
feature/39-chair-sweepsfrom
feature/43-coffee-save

Conversation

@Vatsal2005

@Vatsal2005 Vatsal2005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Press Up/W or gamepad Up while grounded at a coffee machine to drink, refill all five cells and save the current foot position. The authored three-frame interact clip owns input for a quarter second; a held direction never repeats the save. Death returns to the new checkpoint with full health.

The real Rusty Creek machine is located through its collision annotation and chunk offset. Until lane A exports mensa-drinks, its atlas placeholder occupies the exact 40×80 box and flickers for one 12fps frame every two seconds. An explicit pending-art loader avoids requesting an absent real atlas. Checkpoints now copy position fields only.

Issue

Closes #43

Stack

Base: feature/39-chair-sweeps. Human merges bottom up; retarget the next PR to main and merge origin/main into every open branch, never rebase.

Acceptance criteria

  • Up at the machine: drink, save, refill all cells
  • Respawn point updates; the machine flickers while idle

Verification

  • Node 22: npm run typecheck, npm test (108 tests), npm run build; includes main integration at e8577ab
  • py -3.13 scripts/check_docs.py
  • git diff --cached --check
  • Real-file tests check the authored box, translated coordinates and approved drink metadata. Interaction tests cover edge triggering, entering with Up held, ineligible/air rejection, quarter-second input ownership, damage cancellation, refill and checkpoint copy followed by death/respawn. Flicker tests check the one-frame window.
  • Browser: damaged from five to four cells, walked back into the real machine and pressed Up; HUD returned to five. Then two heavy hits and one lethal normal hit returned the hero to the saved x=3968.7, y=537 with five cells. No console errors.
  • Physical gamepad and Vercel preview. Existing deployments require Vatsal2005 to be granted project access by the Vercel owner.

Reference comparison

Plan: docs/02 coffee save.

Authored coffee box above, runtime placeholder below

Made with python scripts/compare.py images art/stages/rusty-creek/collision/rc-1-0.anomaly.png@870,218,50,60 tmp/verification/43-coffee-respawn.png@573,338,78,93 --width 400 --grid 40 --out game/verification/43-coffee-box-compare.png. The annotation preview is half stage scale and the browser is fitted to the viewport; both crops cover the same roughly 100×120 stage-pixel area, shown at 4× for review. Exact 40×80 bounds are asserted by real-file tests. White is the hero body; purple is the coffee interaction box.

Approved interaction poses at native scale on one baseline

Made with python scripts/compare.py lineup hero-hurt:interact-00 hero-hurt:interact-01 hero-hurt:interact-02 --out game/verification/43-drink-pose-compare.png. The approved leaning poses measure 72px high against the 76px standing reference; runtime preserves them without scaling.

Full browser proof shown in chat and retained in ignored tmp/verification/43-coffee-refill.png and 43-coffee-respawn.png. The coffee-test development URL starts at the real authored machine without copying or moving collision data.

Scope and art hand-over

This saves the running game's death checkpoint, consistent with the existing life state. Disk persistence is not part of #43. Real idle/flicker/pour atlas integration follows the pending mensa-drinks export in #84. No art, collision annotations, shared event payloads or lane A files changed.

Resolve coffee machines from authored collision boxes and accept a fresh Up edge while grounded. Play the approved interaction clip, refill all five cells and save the current foot position for death respawn.

Load a measured atlas placeholder until drinks art arrives, with idle flicker and comparison evidence. Copy position fields only in checkpoints. Typecheck, 108 tests, build and docs pass; browser verifies refill and death return at the real machine.
@vercel

vercel Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
wincs Error Error Oct 24, 2026 12:33am UTC

Request Review

@Vatsal2005 Vatsal2005 self-assigned this Oct 23, 2026
@Vatsal2005
Vatsal2005 requested a review from arudaev October 23, 2026 23:35
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@Vatsal2005 must be a member of the arudaev's projects team on Vercel to deploy.
- Click here to add @Vatsal2005 to the team.
- If you initiated this build, request access.
- If you're already a member of the arudaev's projects team, make sure that your Vercel account is connected to your GitHub account.

Learn more about collaboration on Vercel and other options here.

@github-actions github-actions Bot added area:player Hero movement, animation state, camera area:combat Chair, guard, health, damage, save points, pickups area:stage Chunks, layers, collision, clean/anomaly states area:docs Design docs, README, contributor guides labels Oct 23, 2026
@Vatsal2005 Vatsal2005 changed the title [13/13] feat: save and refill at coffee machines [13/14] feat: save and refill at coffee machines Oct 23, 2026
@Vatsal2005 Vatsal2005 changed the title [13/14] feat: save and refill at coffee machines [13/15] feat: save and refill at coffee machines Oct 24, 2026
@Vatsal2005 Vatsal2005 changed the title [13/15] feat: save and refill at coffee machines [13/16] feat: save and refill at coffee machines Oct 24, 2026
Carry human-merged lane A changes upward without rewriting published commits.
@arudaev
arudaev added this pull request to stack #129 October 24, 2026 00:39
@arudaev
arudaev marked this pull request as ready for review October 24, 2026 01:34
@arudaev
arudaev merged commit 2cb1f6d into main Oct 24, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:combat Chair, guard, health, damage, save points, pickups area:docs Design docs, README, contributor guides area:player Hero movement, animation state, camera area:stage Chunks, layers, collision, clean/anomaly states

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M2-S5] Coffee machine save point

2 participants