SFML community forums

Help => Network => Topic started by: Daffern on March 02, 2014, 02:55:34 pm

Title: Latency
Post by: Daffern on March 02, 2014, 02:55:34 pm
Hi everyone. Im currently trying to make a multiplayer action game, and i figured it would be a good thing to measure latency somehow in order to place bulllets for example. Is there a way to measure latency in sfml?
Title: Re: Latency
Post by: zsbzsb on March 02, 2014, 03:00:11 pm
No, but its relatively simple. Send a ping request from the client to the server and then time how long it takes for the server to respond with a pong. Of course you need to code on the server side to respond to ping commands with a pong response.  ;)
Title: Re: Latency
Post by: Daffern on March 03, 2014, 11:46:51 pm
This is probably what i will do, Thanks!  :)