G'day all. We have been having problems, as our mud grows, with mobile_activity() taking heaps of time. It is only called every 10 seconds, but it is not uncommon for 3 seconds or more to be spent in this routine. I suspect this is the cause for some of the annoying lag we get, and it will only get worse with more mobs. Since the mud spends typically 80% of its time sleeping between passes of the main game loop, I was planning on splitting up mobile_activity() to make use of this time. The basic idea of this is to set the virtual alarm to go off a little before the next pass has to begin, then process mobs as usual in mobile_activity() until the alarm goes off. Then after the next pass, do the same thing but continue processing in mobile_activity() from the mob it got up to on the last pass. The effect of this would be to hopefully remove the bottleneck of mobile_activity, but it would also remove the exactness of mobile pulses. I plan to do it so mob's still only get pulsed about every 10 seconds, but it would not be exact as it currently is (not really a problem). I was wondering whether anyone else has tried something similar, or anyone has any thoughts on the matter. I would have thought that mobile_activity() would cause similar problems on most biggish muds (without sufficient processing power :)). -- David Powell Kurve, IMP on ZombieMud.
This archive was generated by hypermail 2b30 : 12/07/00 PST