Factor estimated socket latency into currentTime sets for clients #15
Labels
area: game runtime
Improvements to the core game experience.
status: accepting prs
This issue is ready for a pull request.
type: cleanup
Improving the structural quality of code or runtime smoothness/performance.
Example basic measurement implementation: https://stackoverflow.com/questions/4071258/how-can-i-find-the-response-time-latency-of-a-client-in-nodejs-with-sockets-s/45216554#45216554
By the time a client receives a "the video is now playing" update from the server, they're already some unknown number of milliseconds behind -- generally however long that socket message took to reach them. They should therefore advance the video by how many milliseconds that message took to reach the client.
Proposal: have
EmitContext
also measure the latency of Socket.IO's built-inpong
messages and keep the running average in member of the context. I actually have an npm package that already keeps the calculation available: https://www.npmjs.com/package/fpsanalyzr(Blocked on #10 getting merged)
The text was updated successfully, but these errors were encountered: