Add FPS replication + projectile authority, client prediction hooks, and convergence smoke test#423
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Code Coverage (GCC + lcov)Per-Subsystem Coverage
Total: 50.2% (17825/35483 lines) |
Contributor
❌ CI Error ReportFailed jobs: windows-vs2022-Debug Build ErrorsOther errors (4)Updated: 2026-04-09T06:40:47Z — this comment is updated in-place, not duplicated. |
Contributor
Code Coverage (GCC + lcov)Per-Subsystem Coverage
Total: 50.7% (18080/35676 lines) |
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.
Motivation
Description
NetworkPlayerStateandPlayerInputinGameModules/SparkGameFPS/Source/Game/MultiplayerSystem.{h,cpp}to include per-player velocity,actionFlags, andacknowledgedInputSequence, and addedProjectileDatafields for position/velocity/lifetime/ID/active state.UpdateProjectiles()with server-side hit checks that callNetworkManager::ValidateHit(...), and wired projectile spawn on both client prediction and server receipt.FPSMultiplayerSystemrecords inputs intoSpark::ClientPrediction, applies local prediction onSendInput(), and reconciles with authoritative snapshots viaReconcileToAuthoritativeState()while counting corrections.m_remoteSnapshots) for remote players and snapshotting with acknowledged input sequences inSendStateSnapshot()to support reconciliation.correctionCounttoNetworkStats, surfaced it inNetworkManager::Console_GetStats()and inFPSMultiplayerSystem::Console_GetStatus(), and providedNetworkManager::SetPredictionCorrectionCount()to update the global stat.TEST(NetReplication_MultiplayerSmoke_ServerClientConvergence)inTests/TestNetworkReplicationIntegration.cppthat simulates server/client frame loops with 2-frame latency, spawns/despawns a projectile, runs reconciliation, and asserts convergence and corrective behavior.Testing
cmake --preset linux-gcc-releasesuccessfully to configure the project.SparkGameFPSwithcmake --build build/linux-gcc-release --config Release --target SparkGameFPS -j 4and the target completed successfully.SparkTests) but did not wait for the full test run to complete in-session due to build duration, so the new smoke test is included but not executed end-to-end here.Codex Task