Reduce other-player warp/stutter via heartbeat extrapolation; add player speed-rate knobs#385
Open
Krilliac wants to merge 4 commits into
Open
Reduce other-player warp/stutter via heartbeat extrapolation; add player speed-rate knobs#385Krilliac wants to merge 4 commits into
Krilliac wants to merge 4 commits into
Conversation
…yer speed rates Other-player movement smoothing (Movement.Smoothing, OFF by default): when a moving player's client goes quiet mid-stride (lag/packet loss), the server injects extrapolated MSG_MOVE_HEARTBEAT packets dead-reckoned along the mover's actual heading (forward/back/strafe/diagonal, backpedal-aware), capped to a short window, so nearby clients interpolate smoothly instead of seeing them freeze then warp. Broadcast-only - the server's authoritative position is never changed; the next real client packet corrects it. Ground movement only; A/B netcode. Tunable player speed (Unit::UpdateSpeed): Movement.PlayerSpeedRate global percent multiplier plus optional per-move-type Movement.Run/Swim/WalkSpeedRate, applied to players only. .movement status|config|set command group (console/SOAP capable) to inspect a player's movement state and live-tune the config; speed changes refresh online players immediately. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 28 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Member
|
Conf version will need bumping on this as it has new values. I'll provide an adversarial review for you Sunday. |
…hrough) If a predicted heartbeat position crossed world geometry, observers saw the mover clip through the wall then snap back on reconcile. The extrapolation is now collision-aware: raycast the predicted path via VMap GetHitPosition and clamp the heartbeat to just before any obstacle, so the mover visually stops at the wall. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… options ConfVersion and MANGOSD_CONFIG_VERSION both derive from MANGOS_WORLD_VER; bumping it so servers are prompted to refresh their config after the Movement.* additions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Other-player movement smoothing (Movement.Smoothing, OFF by default)
When a moving player's client goes quiet mid-stride (lag / packet loss), other players normally see them freeze, then warp. This injects extrapolated MSG_MOVE_HEARTBEAT packets — dead-reckoned along the mover's actual heading (forward/back/strafe/diagonal, backpedal-aware) — so nearby clients keep interpolating smoothly until real packets resume. Broadcast-only (the server's authoritative position is never changed; the next real packet corrects it), ground-movement only, capped to a short extrapolation window. It's experimental A/B netcode, hence off by default — flip it on to test.
Tunable player speed (live)
Global Movement.PlayerSpeedRate (percent) plus per-type Run / Swim / Walk rates, applied in Unit::UpdateSpeed. Great for fun realms or testing.
Config (in mangosd.conf.dist): Movement.Smoothing, Movement.HeartbeatMs, Movement.MaxExtrapolateMs, Movement.PlayerSpeedRate, Movement.{Run,Swim,Walk}SpeedRate.
Commands:
This change is