For interested parties some of John Carmack's statements about the development of clientside prediction and physics rewind can be skimmed from his exchanges here:
http://fabiensanglard.net/quakeSource/johnc-log.aug.htm
More information on the authorative combat implemenation:
At the moment it's looking like I will be keeping a queue buffer of recent position and state information for NPCs and Players on the serverside so a timestamp based request can be made for an action such as an attack. This will allow pseudo-physics rewind approximations on a discrete level, continuous and smooth rewinds seem like they'd add too much computation overhead and may be overkill.
It's imperative that average latency between the given requesting client and the server is taken into account during the rewind. Supposing an average of 100ms for a player's request to hit the server and start processing then the request is essentially 100ms stale meaning it's likely the timestamp will be 100ms off and we'll have to rewind in the buffer somewhere around there to determine the result, you can imagine the complexity of the world simulation doubling at this point.
This also begs the question of how is it reasonable for realtime combat to take effectively 200ms to request and receive a response. The staleness of the request can be handled. Past player and npc states are buffered but the client has to predict these changes.
Obviously this can be hidden by animations, in fact now that I think about it the request to attack happens upon input and whenever the network queue is flushed... sadly GladNet leaves that completely up to the underlying Lidgren Library. The response isn't needed in realtime. If I swing a sword for immersion to not be affected I need to get a response from the server by the time the sword has cross the creature. I believe this can reasonably mask the delay caused by the authoritative input.
What about NPC attacks against the player? If using Unity's built in NavMesh and NavMeshAgent (no idea what I plan to use for pathing atm), even assuming fully perfect determinism that never strays even on state change somehow, the state change of an NPC, and thus pathing, will be 100ms off on the player's screen. I'm not really sure how prevent player's from being attacked by creatures that appear not to be completely in range. Keeping everything authoritative while preventing the simulation on the client from seeming unfair and broken is becoming complicated. I will have to figure out a solution to NPC's position being 100ms stale on the player's screen while a player himself may be in an attack range of an NPC and not know it because of this.
Thankfully I have time to come up with a solution until I face this problem.
Connect With Us