Eggnogg wrote:
I was one of the players. It was quite fun, but the game was virtually unplayable for me, because I had such horrendous lag (400 ping).
The biggest problem to do with latency was input lag. My character's actions in relation to my input had about a 1/1.5 second delay. I'm not too sure on this, but I think this would be because player movement (or everything for that matter) is calculated server-side, meaning that I have to wait for the server to respond before my character's actions are performed. If I'm correct on this, then I assume simply making movement calculated client-side would solve this.
You're basically right. The way it works currently is that the client sends its input events to the server, which applies them in the "real" game and then sends the inputs gathered from all the clients and the server itself to all clients, and the clients only now apply the whole set of inputs in their locally simulated games. Essentially, clients' inputs make a round trip on the server which is experienced as input latency on the client side.
In addition to this, the server sends sync packets of the game state meaningful to each client periodically, to keep the client-local games in sync with the server. The clients adapt to the sync data by smoothing out local errors of soldier/grenade/bullet/etc positioning, or, if badly out of sync, snapping the object to its correct place and motion.
RWR isn't far away of getting a proper client side prediction in place. With any luck, it's only short of applying the client's own inputs in the client-local game immediately they are inputted, basically killing the input latency, and estimating other objects' positions ahead of time. In practice, I might have to debug it quite a while to get it right. Anyway, it's just a matter of prioritisation when it will get implemented.
While CSP will fix the input latency, I'm not sure if even that can give a good gaming experience with 400ms lag. The lag will be then experienced as other soldiers being positioned in somewhat incorrectly in client-local games, making aiming and shooting quite hard on the client side. In the end, it's the server with the "real" game state that decides if a bullet hits someone, so with a big lag, a client might see that he hit someone locally, but in the real game, the bullet missed the target.