Quote:Original post by Kest
Network lag should be handled in a way that simulates a delay in event recognition. Not a delay in the actual events. So if it takes 1 second of time to send an instant hit, then the recieving computer's character just needs to realize they were shot 1 second ago.
I agree that this is one way to handle it. It is at best difficult to accomplish, since the packet itself doesn't know how long it took to travel. Nonetheless, assuming you overcome that problem, from the pedant's point of view, that is sufficient to say the hit is instantaneous
What does it mean, however, for a simulation to enact past events in the present moment? I mean, I played Quake 1 multiplayer, and that's basically how things worked, but it was completely unrecognizable as a simulation because of it.
You're talking about the internal representation of events, but those are utterly meaningless without some perception of them, and that perception is inherently desynchronized, unless you have some way to simulate things ahead of time. Some FPS engines have even attempted this, though not, to my understanding, to any significant gain.
Let's continue your example: Assume player A sees player B at position C. Assume they both have the same time listed, but there is a 1 second delay in receiving communication over the network. Assume at time t player B changes his direction of movement by 90 degrees. Player A shoots at time t + 0.5. In her mind, she is shooting directly at player B. The turn arrives at time t+1. Player B teleports to his "true" (off-by-one-second) location on A's screen, and A realizes she has not hit her target. Player B doesn't realize the shot has occurred until time t + 1.5, by which time he probably has less than a second to dodge A's next shot.
The above scenario is why most weapons in a networked shooter are spread-effect weapons, and also a big part of why the point-effect weapons tend to be so much better per-shot. There is this spread-out notion of where someone is, what is happening, and what the net effect was. It isn't meaningful to say that something happens instantaneously because of that spread-out effect. If you rely too heavily on truly instantaneous effects, your game falls apart. The key balance is between making things playable and making the physical simulation relatively true to each person's perception of events - it would not do to have player B dead on player A's computer but not on his own.