Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF: images & caching.
On Mar 9, 9:48pm, Philip Brown wrote:
> Subject: Re: CF: images & caching.
> >>>>[From Mark Wedel]
> ...
> It may not be a bad idea to add various outgoing queues to the server
> - ie, outgoing map queue, outgoing stats queue, outgoing image queue
> (there are others that could be added). But in the basic example, if
> data to the client is getting backed up, you may only want to send one
> full map update instead of several partial updates. Same for the stats
> - rather than sending 5 stat commands, sending 1 with everything may be
> more efficient.
>
> I haven't looked at the server code TOO much, but I thought it already
> did something like this with its server-side "dirty" square checking.
> Or is that only used to minimize the amount of data sent with each
> update (yet an update is done EVERY time the map is changed)?
IT sort of does this. Basically, each check, it checks to see if the map has
changed, and if so, sends an updated of the changed squares.
Last version I changed it so it does this once a tick (before it did it each
time the player moved I believe.)
However, this still means that the map gets updated each tick, assuming
something has changed.
If the player has a slow/backlogged link, and is 10 ticks behind, that means
there are 10 map updates in the transmit queue. In reality, all the player
probably cares about is the last map, and the other 9 could be discarded. So
additional intelligence could be added keep track what needs to be sent, and if
the pipe to the client is backlogged, discard earlier versions of some
messages.
>
> If so, then yeah, it would be nice bandwidthwise if the map handling was
> USER-TUNABLE to send updates only every X tics
> That would be really nice on slow links. but on high-speed links, it's nice
> to be able to get things updated as soon as they happen.
This would actually be pretty easy to add right now. There is a global tick
count I believe, and it would be pretty trivial to add a refresh counter in the
server structure, and some logic like if (total_ticks % refresh_rate == 0)
update_map.
--
-- Mark Wedel
mark@pyramid.com
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]
References: