--
[ Picked text/plain from multipart/alternative ]
I have a few questions about networking and prediction.  So that I might not
completely seem like an idiot, I'll outline first what I think I know.


So, client-side prediction.  For a variable added to the prediction table
("BEGIN_PREDICTION_DATA" and that good jazz), one of two things can happen
each client tick:
1.  If no server update is forthcoming, the value of the variable is
extrapolated forward (probably with the help of some shadow state somewhere)
2.  If there is a server update, it checks the difference between the
predicted and the server-supplied value.  If the delta is over the tolerance,
it is corrected; otherwise it's allowed to stand.

Player-movement prediction (client-side, of course) is just a system built
over that.  When the client sends off its usercommand, it also runs it
locally.  By running the usercommand, it changes the client's local copy of
some set of variables which are not strictly required to be, but for all
practical intents and purposes should be predicted variables (which in turn
should be networked as well).  These variables are corrected as well by the
"base" prediction system; thus player-controlled entities are not any
different to the prediction system than any other predicted entities, but
they have the "bonus" of also being driven by UserCmd.

Server-side lag compensation.  Basically, the server keeps around snapshots of
"relevant entities" for some suitable time into the past.  When the
client-side command comes in, the client command is "ticked" using the
appropriate back-snapshot, and the results accordingly effected.  ("Effect",
as in to "effect an action".)


So now, the questions.

1.  How does the prediction system extrapolate?  Linearly, based on a "shadow
state" and a time delta?  Or something funkier?
2.  For the purposes of server-side lag compensation, are the only "relevant
entitites" the player entities?  Or are other entities also included?
3.  In "player.h", line 19, I see a define for a "CMD_MAXBACKUP".  So I assume
that there's a pile of UserCmds somewhere.  Whatever for?
4.  I have a suspicion that the prediction model outlined above is too simple.
Specifically, if you (the client) have a server snapshot in hand, why bother
using a tolerance on your predicted variables?  Why not just use the server
value anyway?

-John Sheu
--
                                I
            think                                poem
   that              never               as                a
I       shall    see        a     lovely      as     binary   tree
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to