Stop back-dating flicks, and give the half-volley rescue the right deadline

Oliver's v367 log: every 62-64 ms flick landed 76-92 ms early and a 97 ms
one whiffed — v366's touch-down timing for flicks was wrong; a flick is
timed by its swipe (flickLead now 0, the age is still logged). The
early-swing half-volley rescue checked the bounce against the long volley
window and then expired on the bounce frame; it now uses the shorter
groundstroke window. The log also records where he stood when the
opponent struck and where the auto-run was taking him on a miss. v368.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
wuwiandClaude Opus 5.5 committed 2026-10-14 13:13:08 +02:00
1 parent dfdb699f9d
commit fe090f2fba
5 files changed
+37 -11

No files matched your search

+4 -5
View File
@@ -207,11 +207,10 @@ cv.addEventListener('touchmove', e => {
? { ax: Math.abs(dx) > dist * 0.38 ? Math.sign(dx) : 0,
az: Math.abs(dy) > dist * 0.38 ? Math.sign(dy) : 0,
fx: dx / dist, fy: dy / dist, mag: dist } : null;
// ...timed, like the tap, from the moment the finger LANDED (gameplay.keyPressed's `lead`): the
// timed gold ring means "touch now", and a flick only swings once it has travelled flickMin.
// Capped at flickLead, so a slow drag still has a window to swing into (the left-flick lesson).
// The touch's age rides along for the swing log; keyPressed decides how much of it the swing
// clock is back-dated by (TUNE.flickLead — 0: a flick is timed by its swipe, his v367 log).
if (G.swipe && !stick.swung && G.phase === 'rally') {
stick.swung = true; keyPressed('Space', Math.min(TUNE.flickLead, (performance.now() - stick.t0) / 1000), true);
stick.swung = true; keyPressed('Space', (performance.now() - stick.t0) / 1000, true);
}
}
}, { passive: false });
@@ -240,7 +239,7 @@ const endTouch = e => {
az: Math.abs(dy) > dist * 0.38 ? Math.sign(dy) : 0,
fx: dx / dist, fy: dy / dist, mag: dist, // raw vector: splatter free-aim
t: performance.now() };
if (!stick.swung) keyPressed('Space', Math.min(TUNE.flickLead, dt / 1000), true); // the crossing already swung — never twice per gesture
if (!stick.swung) keyPressed('Space', dt / 1000, true); // the crossing already swung — never twice per gesture
}
stick = null; touchAxis.x = 0; touchAxis.z = 0; G.swipe = null;
}