Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Track player win/loss state on the server. #14686
Server-side replay saving and stat tracking both require the server to know when a player wins or loses the game. This information is currently generated from the client-side world state.
Requiring servers to simulate the game state is an option, but a bad one.
The most feasible option will be to implement a new type of network packet (like sync, but not forwarded to other clients) that contains the player id, result (win/loss) and the tick that the result occurred. After the server forwards the orders for frame N it can check the results from frame N - OrderLatency and then force a desync if all clients don't agree. Disconnect results can be set directly from the serverside.