[MUD-Dev] Ticks?
Tand'a-ur
tandaur at ix.netcom.com
Sun Jun 9 00:35:42 CEST 2002
"Anderson, David" wrote:
> What have other people done for regenning? I'm just doing my best
> to have it make a bit more sense.
Some muds have multiple pulses besides the main tick. Like you could
do every second or so there is the health update pulse. Other things
that need updating could have other length of pulses. What I do is
try to figure out how often something needs to happen, and how cpu
intensive the task is.
If it is fairly high cpu intensive i try not to update it very
often. If it is something that has to be updated very frequently
then I try to make sure it has very low impact. So what you could do
is a quick update of just health and nothing else every second or a
period of time that seems appropriate to you. And do the other
updates at a longer length of time.
It is possible to make updates way too frequent for the amount of
cpu cycles it takes up. It once lead my MUD to completely go into an
endless loop that used up more and more cpu time as the update was
called lets say every few second and it took more than that time to
execute the code.
Luckliy i was just in the middle of rewriting all of that code and
after i optimized the code then it worked better.
Anyhow, basically, you can have many different "ticks" or pulses, or
updates or whatever you want to call them.
-mike
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list