The run cycles anchor on their feet, and stride at a real cadence
Oliver: 'the motion seems very flashy and unnatural'. Two causes, both measured: drawChar centres a frame by its total width while the racket's reach varies across the cycle, so the BODY teleported sideways up to 28 source px on a frame swap (the female player was worst) — every frame is now padded until its lower-third centroid sits at the frame centre (residuals ±0.2 px, the normalisation lives in _runroll.py's cut). And the hardcoded 4.5 cycles/s was tuned on 2-4 near-duplicate frames; on eight real phases it was a strobe — rolled sets stride at TUNE.runHz (2.4), old art keeps 4.5. In-pane: body wobble down from ~36 device px per swap to 3.2. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a49acff51
commit
e8b5c1905f
32 files changed
+27
-5
No files matched your search
+6
-4
@@ -221,7 +221,7 @@ function farB(z) {
|
||||
// Asset cache-buster — bump with main.js?v=N (see the img.src note below). EXPORTED because the
|
||||
// menu screens hang <img> tags on the same files, and two copies of this number is one copy too
|
||||
// many: the one that does not get bumped is the one that serves a cached 404.
|
||||
export const SPRV = 109;
|
||||
export const SPRV = 110;
|
||||
// The boot bar in main.js watches this. Nothing here CHANGES when things load — every sprite was
|
||||
// already requested at import — it just makes the wait visible and holds the menu back until the
|
||||
// last sheet has landed. See the onerror note below for the other half of "sometimes missing".
|
||||
@@ -1445,10 +1445,12 @@ function drawChar(ch) {
|
||||
name = 'p_pull';
|
||||
// The run cycle at whatever count the character's sheet carries: the _runroll.py cycles are 6
|
||||
// (one call, one row, one character — see assets/_runroll.py for why the old per-frame art
|
||||
// flickered); un-rolled characters fall back to 4 or 2. Same CYCLE rate at every count — more
|
||||
// frames subdivide the stride, they do not speed it up, exactly as ZFRAMES does for the shamblers.
|
||||
// flickered); un-rolled characters fall back to 4 or 2.
|
||||
const runN = SPR[pre + 'run8'] ? 8 : SPR[pre + 'run6'] ? 6 : SPR[pre + 'run4'] ? 4 : 2;
|
||||
if (ch.pose === 'run') name = pre + 'run' + (Math.floor(ch.runT * 4.5 * runN) % runN + 1);
|
||||
// The rolled 6/8-frame cycles run at their own STRIDE RATE (TUNE.runHz, cycles/s). The old 4.5
|
||||
// was tuned on 2-4 near-duplicate frames, where it read as vigour — on eight real phases it was
|
||||
// a strobe ("very flashy and unnatural"), most of a full stride every display frame.
|
||||
if (ch.pose === 'run') name = pre + 'run' + (Math.floor(ch.runT * (runN >= 6 ? TUNE.runHz : 4.5) * runN) % runN + 1);
|
||||
// (the receiver used to flip to run1/run2 here as a "split-step" — it read as a man sprinting on
|
||||
// the spot, because the run frames are a full leaning stride, not a ready-hop. He idles now.)
|
||||
if (ch.pose === 'swing') name = pre + (ch.poseT < 0.15 ? 'swing1' : 'swing2');
|
||||
|
||||
Reference in new issue
Block a user