networking - Client-side prediction & server reconciliation -
i’ve read articles client-side prediction , server reconciliation i'm missing parts, take part of client side prediction don’t understand how reconciliation done. i’ll take these 2 pieces of well-known articles reference:
http://www.gabrielgambetta.com/fpm2.html
#2. applying client-side prediction again, client can calculate “present” state of game based on last authoritative state sent server, plus inputs server hasn’t processed yet
in effect client invisibly “rewinds , replays” last n frames of local player character movement while holding rest of world fixed
ok, take client receives acknowledgement server, how inputs re-applied? can interpret in 2 ways.
from client point of view, game loop executed ‘x’ times per second (frames per second)
first: non-processed inputs re-applied in same frame, here expression “invisibly rewind , replay “ fits perfect because in end see in screen result last input re-applied.
i don’t see benefit of doing because see no difference between re-applying last n inputs server update present time , keeping client state before update, know in advance result same.
second: inputs re-applied 1 one in consecutive frames . human being couldn’t notice few frames being replayed cannot thinking if client experiencing significant latency notice himself going past , replaying last ‘n’ frames.
can point me in right direction , please? thanks
i know it's been quite while since you've postedthis question, on google's feed, i'll answer.
i don’t see benefit of doing because see no difference between re-applying last n inputs server update present time , keeping client state before update, know in advance result same.
the whole point of reconcillation sync server. don't know result of our actions be. predict it. times result different , still want image of what's going on on server.
the first way defenitely way go.
the second way doesn't make sense. remember player receives updates on regular basis. means latency of 200 ms see character 200 ms in past time.