Skip to content

[8/8] refactor(combat): one timing source – clip speeds from the boards - #219

Closed
arudaev wants to merge 2 commits into
playtest/7-white-backdropfrom
playtest/8-clip-timing
Closed

arudaev wants to merge 2 commits into
playtest/7-white-backdropfrom
playtest/8-clip-timing

Conversation

@arudaev

@arudaev arudaev commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Stack: 8 of 8 (playtest): base #218. Merge bottom-up, only on Alexander's word.

What and why

#156, criterion "one timing source": every clip's speed comes from its anims.json, with no n / 12 left in gameplay code. Before this PR, the chair's moves and the three enemies timed their frames by hand:

  • combat/clips.ts: frameTime, frameCount, clipTime and frameAt over a board's animation table. Without a table (tests, a board not loaded yet), the authored 12 fps and frame counts stay, so behaviour is unchanged today.
  • The chair (Sweeps, Overhead, LowSweep, Guard, GuardPush): each takes its board's table (chair-side, chair-overhead, chair-block). ChairCombat and the player pass the loaded ones. Retiming a clip is now an edit to its anims.json (or the board's fps in boards.json), not to five files.
  • Rover, crab, drone: same, with enemy-rover, enemy-crab and enemy-drone passed from rovers.ts.
  • Removed: lifePose and paintLife, unused, which carried their own * 12 and the generic setTintFill flash.

Left, on purpose:

  • the ladder's end times, which a test already pins to hero-ladder.anims.json;
  • the jump's landing fallback, used only before the atlases load (the player passes the real ones);
  • Jenny's ram sequence (jennyRam.ts), a scripted timeline. That one is next for Rework movement and combat feel against the art #156.

Issue

Refs #156 (the timing criterion; the stride, transitions, data-not-code and played-and-recorded criteria stay open)

Verification

  • npm test: 336 passed (every existing model test unchanged, run on the defaults); tsc clean.
  • In the browser (dev server): in the rust maze, all nine enemies (7 rovers, a crab, a drone) built with their loaded tables (clips set) animate on their own clocks (drive-02 → drive-04, walk-02 → walk-04, hover), with no errors.

…ims.json

#156: the chair's moves (sweeps, overhead, low sweep, guard and its push)
and the rover, crab and drone timed their frames as n / 12. Each model now
takes its board's anims.json (combat/clips.ts: frameTime, frameCount,
clipTime, frameAt); the chair and the enemy row pass the loaded tables,
and without one the authored 12 fps stays. The unused lifePose /
paintLife (generic white tint) are gone.

Refs #156
@vercel

vercel Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
wincs Ready Ready Preview Oct 25, 2026 9:36am UTC

Request Review

@arudaev arudaev changed the title [8/N] refactor(combat): one timing source – clip speeds from anims.json [8/8] refactor(combat): one timing source – clip speeds from anims.json Oct 25, 2026
@arudaev arudaev changed the title [8/8] refactor(combat): one timing source – clip speeds from anims.json [8/8] refactor(combat): one timing source – clip speeds from the boards Oct 25, 2026
@github-actions github-actions Bot added area:player Hero movement, animation state, camera area:combat Chair, guard, health, damage, save points, pickups area:enemies Autonomous robots and Jenny labels Oct 25, 2026
The arena-platform board named tmp/girder-ref.png as an input; tmp/ is not
in Git, so check_docs failed in CI. The crop of the maze girder is
committed next to the arena plate.

Refs #72
@github-actions github-actions Bot added area:art Sprite sheets, stage plates, direction pack area:stage Chunks, layers, collision, clean/anomaly states labels Oct 25, 2026
@arudaev

arudaev commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

Replaced by #224: the same commits replayed on the current base of the stack (this branch conflicted after the platform fixes were carried up). No force-push.

@arudaev arudaev closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:art Sprite sheets, stage plates, direction pack area:combat Chair, guard, health, damage, save points, pickups area:enemies Autonomous robots and Jenny 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.

1 participant