I am making a multi-player game in C ++:
Clients simply take commands from users, calculate their playerβs new position and report it to the server. The server receives such position updates from all clients and transmits them for each of them. In such a scenario, which parameters should determine the time interval between successive updates (I do not want too many updates, therefore, suffocating n / w). I thought that the maximum ping among clients should be one of the defining parameters.
Secondly, how to determine this ping / client delay? Other topics on this forum involve using raw sockets or using the system ping command and collecting data from a file .. they mean using something like system('ping "client ip add" > file') or forking and exec'ing command ping.
c ++ network-programming
Ankurvj
source share