Skip to content

[11/16] feat: add health damage and checkpoint respawn - #135

Merged
arudaev merged 3 commits into
feature/31-animation-state-machinefrom
feature/42-health-and-respawn
Oct 24, 2026
Merged

arudaev merged 3 commits into
feature/31-animation-state-machinefrom
feature/42-health-and-respawn

Conversation

@Vatsal2005

@Vatsal2005 Vatsal2005 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

The hero has five cells, one-cell normal damage and two-cell heavy damage, white flash, 64.5px knockback and one second of invulnerability with flicker. Death plays the supplied collapse clip and pixel dust, then restores full health at the checkpoint. Orange hazards damage and reset to safe ground; black no-go regions reset without damage. Actors can register respawn callbacks; defeated boss ids survive scene restarts. The public checkpoint/healing hooks are ready for coffee and food interactions.

Issue

Closes #42

Stack

Base: feature/31-animation-state-machine. Human merges bottom up; retarget the next PR to main and merge origin/main into every open branch, never rebase.

Acceptance criteria

  • Five cells, normal damage 1 and heavy charge damage 2
  • White flash, about 1.5m knockback, one-second invulnerability and flicker
  • Collapse/dust and full-health checkpoint respawn; normal actor reset callbacks and persistent defeated bosses
  • Hazard damage and safe-ground reset; no-go reset is free

Verification

  • Node 22: npm run typecheck, npm test (93 tests), npm run build; includes main integration at e8577ab
  • py -3.13 scripts/check_docs.py — 650 files
  • git diff --cached --check
  • Pure tests cover costs, immunity duration, both knockback directions, checkpoint copies, full-health respawn, actor resets, defeated-boss protection, hazard/no-go reset semantics and healing cap
  • Browser: 1-cell hit moved x=90 to x=154.5; immediate second hit ignored; heavy hit costs 2; hazard costs 1 and no-go costs 0
  • Browser: death clip then respawn at x=90 with all five actual battery sprites restored; no console errors
  • Browser: stepped off the real first Creek deck into its authored no-go area; returned to last safe x=438.1 with all five cells, rather than the entry spawn
  • Actual coffee activation follows [M2-S5] Coffee machine save point #43; real rover contact/defeat reset follows [M2-S6] Rover: patrol, spot, charge #45, and defeated Jenny stays dead after [M4-S5] Jenny: rev, charge, crash, debris, stunned – three phases #57. The checkpoint and actor-registry behavior is tested here.
  • Vercel preview: GitHub states Vatsal2005 needs project access on Vercel to create deployments. A project owner must grant access; local checks pass.

Integration

The six agreed event payloads remain intact. Hit/death/save use the existing bus; healing and respawn update the HUD through its public model API. Development F5 exercises a hit, Shift+F5 heavy damage, Ctrl+F5 a hazard reset and Alt+F5 a free reset. F5 is captured by the game and these controls are omitted from production. Attacking is locked while dead, knocked back or climbing.

Screenshots

Shown in chat, saved in ignored tmp/verification/42-hit.png, 42-hazard-no-go.png, 42-respawn.png, 42-fall-safe.png and the timestamped death PNG sequence. No verification media or art files are committed.

Apply the documented cell costs, knockback and hit immunity, then collapse into pixel dust and restore full health at the checkpoint on death. Keep free no-go resets separate from damaging hazards and return to the last safe ground.

Expose healing, checkpoint and actor-reset hooks for the coffee, food and enemy stories. Preserve defeated bosses across scene restarts and update the public HUD model without changing the agreed game events.
@Vatsal2005 Vatsal2005 self-assigned this Oct 23, 2026
@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:31am UTC

Request Review

@Vatsal2005
Vatsal2005 requested a review from arudaev October 23, 2026 22:48
@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.

Carry human-merged lane A changes upward without rewriting published commits.
@Vatsal2005 Vatsal2005 changed the title [11/11] feat: add health damage and checkpoint respawn [11/12] feat: add health damage and checkpoint respawn Oct 23, 2026
@Vatsal2005 Vatsal2005 changed the title [11/12] feat: add health damage and checkpoint respawn [11/13] feat: add health damage and checkpoint respawn Oct 23, 2026
@Vatsal2005 Vatsal2005 changed the title [11/13] feat: add health damage and checkpoint respawn [11/14] feat: add health damage and checkpoint respawn Oct 23, 2026
@Vatsal2005 Vatsal2005 changed the title [11/14] feat: add health damage and checkpoint respawn [11/15] feat: add health damage and checkpoint respawn Oct 24, 2026
@Vatsal2005 Vatsal2005 changed the title [11/15] feat: add health damage and checkpoint respawn [11/16] feat: add health damage and checkpoint respawn Oct 24, 2026
Carry human-merged lane A changes upward without rewriting published commits.
@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:player Hero movement, animation state, camera

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[M2-S4] Health, damage, death and respawn

2 participants