MP: peer accel/decel "snap" MEASURED ~0.64u (not ~2.9u) -- effectively resolved (task #50)

Went after the flagged ~2.9u peer-motion snap. Added a BT_SNAPLOG diagnostic
(mech4.cpp: logs the re-anchor drift eMag = |authority - dead-reckon| absorbed per
frame) and ran a controlled accel/decel soak: node B BT_AUTODRIVE + BT_DRIVE_SWEEP0
sweeping the throttle through STOP, node A observing, affinity-pinned.

Result: peer drift maxes at ~0.64u (median 0.54u, 18 events >0.5u over 48s), gently
absorbed at k~0.24/frame -- SUB-UNIT, at the noise floor. The ~2.9u figure was stale:
it predated the peer body-channel swap (96a896a, which put the peer on the same
channel the master's mirror predicts) AND was measured without the CPU-affinity fix
(packet-jitter-sparse records inflate the drift). The old "run the master mirror on a
leg-channel prediction" plan is moot now the peer is on the body channel.

No motion-code change -- just the measurement + the BT_SNAPLOG diagnostic (retained).
KB (multiplayer.md, open-questions.md) corrected to the measured value. checkctx CLEAN.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-15 16:15:56 -05:00
co-authored by Claude Opus 4.8
parent bc4d6e5597
commit 3224009dc1
3 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -410,7 +410,7 @@ Decomp-verified (workflows w0odszxro/wh1h5gnmc, 3 make-or-break claims adversari
- MASTER + PEER run the SAME predictor. The master's SEND-mirror (FUN_004a9b5c @0x4aab9c) advances projectedOrigin by IntegrateMotion(mj=0) fed the LAST-SENT bodyTargetSpeed, then deadbands |localOrigin-projectedOrigin|^2 vs UpdatePositionDiffrence@0x768. A gait-driven peer REQUIRES this gait mirror (a constant-velocity mirror under-sends -> tug-of-war, measured ratio 1.86).
- T4 CLOSED: both leg(0x65c) and body(0x6bc) animators are AnimationInstances of the SAME JointedMover/JointSubsystem (JMOVER.cpp:1382) -- either poses the WHOLE skeleton. Our port keeps the peer on the LEG channel (body unbound on the peer); faithful functional equivalent.
RECONSTRUCTION STATE: coupled path is DEFAULT ON (mech4.cpp: s_drPos gait-coupled, s_gaitMirror/Send). Reverts: BT_DR_POS=1 (peer velocity), BT_NO_MASTER_GAITMIRROR (master const-vel mirror). Measured: single-source coupling backward-steps 0.1% (vs the two-source split's churn), position ratio 1.043. RESIDUAL (follow-up): occasional ~2.9u snap from the leg(peer)-vs-body(mirror) channel mismatch -- to close, run the master mirror on a leg-channel prediction fed last-sent speed, matching the peer's poser. Also open: exact _DAT_004ab9cc decay constant; whether IntegrateMotion's 2-stage angular integrate is intended.
RECONSTRUCTION STATE: coupled path is DEFAULT ON (mech4.cpp: s_drPos gait-coupled, s_gaitMirror/Send). Reverts: BT_DR_POS=1 (peer velocity), BT_NO_MASTER_GAITMIRROR (master const-vel mirror). Measured: single-source coupling backward-steps 0.1% (vs the two-source split's churn), position ratio 1.043. RESIDUAL (follow-up): MEASURED SMALL / effectively resolved (2026-07-15). With the peer now on the BODY channel (`96a896a`, matching the master's body-channel mirror) + affinity pinning, an accel/decel soak (node B `BT_AUTODRIVE`+`BT_DRIVE_SWEEP0` through STOP, node A `BT_SNAPLOG`) measures peer drift maxing at **~0.64u** (median 0.54u, 18 events >0.5u over 48s), gently absorbed at k~0.24/frame -- SUB-UNIT, not the earlier ~2.9u (which predated the body-channel swap AND was measured without CPU-affinity, i.e. with packet-jitter-sparse records). At the noise floor; no fix warranted. The old "run the master mirror on a leg-channel prediction" plan is moot now the peer is on the body channel. Still open (cosmetic): exact `_DAT_004ab9cc` decay constant; whether IntegrateMotion's 2-stage angular integrate is intended.
## Peer motion: the "random shakiness" is single-box packet jitter, NOT the game (task #50, 2026-07-15) [T2]
+5 -3
View File
@@ -653,8 +653,10 @@ and **"Peer motion: the 'random shakiness' is single-box packet jitter, NOT the
(`ProcessorAffinity 0x00F/0x3C0`, baked into `tools/mp_launch.sh`) restored even ~17ms
delivery and the shakiness vanished (user-confirmed). Real pods are dedicated machines and
never see it. **DO NOT add an interpolation/jitter buffer** to mask a rig artifact.
- Minor non-gating follow-ups (tracked in [[multiplayer]]): an occasional ~2.9u
leg(peer)-vs-body(mirror) channel-mismatch snap; the exact `_DAT_004ab9cc` offset-decay
constant; whether `IntegrateMotion`'s 2-stage angular integrate is intended.
- Minor non-gating follow-ups (tracked in [[multiplayer]]): the peer accel/decel drift
(flagged ~2.9u, but **MEASURED ~0.64u max** on the affinity rig with the peer on the body
channel -- `BT_SNAPLOG` + `BT_DRIVE_SWEEP0`, 2026-07-15; sub-unit, effectively resolved,
no fix warranted); the exact `_DAT_004ab9cc` offset-decay constant; whether
`IntegrateMotion`'s 2-stage angular integrate is intended.
- Speed model decomp-settled (`2c6db6a`): analog throttle, '5 speeds' false, `throttleState@0x4a4`
is actually the fall-surface material (RENAME PENDING).
+7
View File
@@ -2207,6 +2207,13 @@ void
const float eMag = (float)rmErr.Length();
float k = 0.15f + eMag * 0.15f; // error-proportional catch-up
if (k > 0.6f) k = 0.6f;
// DIAG (BT_SNAPLOG, task #50): the peer drift = |authority - dead-reckon|
// absorbed this frame -- the "snap" magnitude. Log > 0.5u so an accel/decel
// soak (BT_DRIVE_SWEEP0) measures the residual.
static const int s_snapLog = getenv("BT_SNAPLOG") ? 1 : 0;
if (s_snapLog && eMag > 0.5f)
DEBUG_STREAM << "[snap] drift=" << eMag << " k=" << k
<< " legAdv=" << replLegAdv << "\n" << std::flush;
// AT-REST snap (user "gliding stops"): when the legs have wound down
// (replLegAdv ~0), gliding the body to absorb the residual offset is
// VISIBLE because no leg motion masks it. With the feet planted a