Skip to content

Fix joined-player laser cadence and muzzle position - #33

Merged
sbddesign merged 2 commits into
feat/lobbyfrom
fix/client-weapons
Sep 6, 2026
Merged

sbddesign merged 2 commits into
feat/lobbyfrom
fix/client-weapons

Conversation

@sbddesign

@sbddesign sbddesign commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

A joining Wasp could sound like it was firing far faster than the host and draw new lasers behind its predicted hull. The same three-second, 100 ms each-way latency probe reproduces this on both pre-lobby 6a73896 and lobby e74a47c: 26 host volleys, 309 local laser sounds, and all 25 newly received local bolts behind the ship (up to 49 units).

Restore the weapon cooldown with snapshots and keep reconciliation silent. Fresh prediction emits one local-pitch sound per volley and cosmetic tracers at the predicted muzzle. Delayed local authoritative bolts remain in the snapshot but are hidden while prediction is active. Cosmetic collisions cannot call ship damage; the host still decides hits and scoring. Session/snapshot protocol is now v3, so both players must reload the same build.

This is a separate fix for a pre-existing bug, stacked on #32 (feat/lobby) because it extends the snapshot protocol. Merge #32 first; its implementation is unchanged.

Validation at 1dac6ae (includes main’s BFG change and the resolved lobby):

  • 718 simulation checks, balance contract, typecheck and production build pass.
  • Same latency probe: 26 host volleys / 26 sounds; with 25% packet loss: 22 / 22. Every cosmetic tracer starts within 0.001 units of the predicted muzzle.
  • Regression checks cover silent replay, cooldown restoration, volley deduplication, no cosmetic damage callbacks, no duplicate authoritative drawing, tracer expiry and new-match reset.
  • Full mutation gate rerunning for this merged head (the earlier pre-BFG head passed 136/136).
  • Real Chrome/WebRTC host and guest in separate processes with 100 ms each-way delay: 35 host volleys / 34 local WebAudio laser sounds; both remained in flight, zero page errors. Holding F silenced fresh predicted guns during BFG charging. Screenshot and test output retained in the workspace. This was one Mac, not two physical devices.

Preview: https://neon-orbit-git-fix-client-weapons-delineatormedia.vercel.app/?host=2

Typecheck/simulation/balance/build passed locally. Full local and GitHub mutation gates pending on the merged head.

Signed-off-by: Stephen DeLorme <stephen@d.elor.me>
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
neon-orbit Ready Ready Preview Sep 6, 2026 7:27pm UTC

Request Review

@sbddesign
sbddesign marked this pull request as ready for review September 6, 2026 19:23
Signed-off-by: Stephen DeLorme <stephen@d.elor.me>
@sbddesign
sbddesign merged commit a5c498f into main Sep 6, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview 1dac6aee Deployed Sep 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant