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

Re: CF: images & caching.




>> 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.

I think it would be even better if user could specify max_updates_per_tick
so player would receive updates each tick when the update was simple, but
would get fewer updates when there are lots of updates.  I think this
could be implemented as:
EACH_TICK:
	add max_updates to counter
	if counter > max_dates then counter = max_updates
	if counter <= 0 then return  (send no updates this tick)

	decrement counter for each font number sent

That way if you playing over a slow link you get less frequent updates
only when it is likely that there are too many updates.

							sdw

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