[crossfire] Buffer flooding
Mark Wedel
mwedel at sonic.net
Tue Oct 10 00:21:54 CDT 2006
Alex Schultz wrote:
> To my understanding, buffer flooding occurs on the server side, not the
> client side.
> One simple fix could be done client side however; One could make the
> client ignore key-repeats, getting rid of the command buffer issues
> caused by holding the key down. When using crossfire, I can't think of a
> time I actually make use of key repeating (using running for example
> doesn't rely on key repeating, just on holding the run key down)
That could be reasonable. OTOH, I'm not sure if new players, before they
realize about the run feature, may hold down direction keys.
>
> Also, IMHO the command buffer needs some redoing anyways: Paralysis is
> currently implemented simply as not processing the command buffer, with
> which I believe there are a few issues. For one, I believe it would make
> sense for some types of commands such as communication commands,
> possibly other than say, to ignore paralysis. Also, it might be a good
> idea to instead of buffer actions while paralyzed, to just ignore them.
Yes, the command handling on the server could be redone.
In the ideal case, it works something like this:
1) Read all pending commands from the client. Commands that are considered free
can be executed (free commands could be administrative stuff, like maps, player
communication commands, so forth). One such free command could be 'cancel all
commands before this' type of thing.
2) The commands read are stored into a pending command buffer (maybe a linked
list). If the player does not have time to execute non free commands, nothing
more is done.
3) If the player does have time to execute commands, run the first command on
the list, remove it, and repeat
4) Possible enhancement: Add some form of priority tagging to commands (number?
Just a single flag?) In this way, that 'drink healing potion' command could
be a priority command, which is run before the other pending commands, no matter
where it shows up.
More information about the crossfire
mailing list