Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: New client/server & command buffering.




The problem of repeating commands is basically a question of how to
have minimal buffering of commands (data) over a WAN that could either
be quick or slow.  The number of command typeahead needs to be kept to
a minimum, but enough to be able to keep player moving at maximum rate.

Seems to me this calls for simple command windowing solution.  Client
sends each command is with cmd_number modulo 256.  Server sends response
which includes latest cmd_number PROCESSED by server.  Client won't
send more than XX commands ahead of what server has processed where
XX is a client option that player could set to whatever works best.

Thus client and server stay relatively closely in sync in terms of
commands sending and processing while still allowing as much typeahead
as needed to keep player moving at full.

>|   Seems to me that the best solution is to make the client smarter
>|   and not send up commands faster than the player's movement. Which
>|   means remove the whole concept of repeat between client and
>|   server, but instead repeat is a client issue of when to send up
>|   the next command. If server updated client with character's speed
>|   then client could pace the sending of commands so that server
>|   never has more than a couple commands buffered for the player.
>
>Not all actions should take the same time, i.e. dealing a blow with
>your sword and casting a spell. I think it should be up to the server
>administrator to adjust these times, and it would be bad to have to
>keep the client and server in sync. (Of course, the server could send
>a reply stating how long that command will take, but the time is
>always dependent on many variables so it makes little sense to do
>caching.)

But then the problem with that approach is then client and server need
to agree upon the time the command took place or the action occurred
(client counts delay from when?).  So then neither of these approaches
look that promising.

							sdw
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]