I am curious about the details of lag compensation in games. I have read a lot of articles about it, for example:
And i have some questions:
1) Okay, so the player A sends the command to move at 10.5 time, it arrives at server at 10.6, so now the server needs to rewind time, set the players to their positions at 10.5 and then process the input from the player A. BUT the player will always move, shoot, jump and this means that the server always needs to rewind EVERY TIME it receives the input from the player. Isn't it wasteful? It will cost a lot of resources, right? Or am i thinking wrong?
2) At the 1 link the guys from valve give me that formula to compute the time when the command should be executed: Command Execution Time = Current Server Time - Packet Latency - Client View Interpolation. But on the 3rd site the author says that the client sends the Command Execution Time and the server does not need to use that complicated formula to calculate something that the client can give the server for free. I mean, the player will always send the correct info about Command Execution Time, so server can believe him.
3) Give me other resources or examples with lag compensation, please.