[DGD]Global Reset
Stephen Schmidt
schmidsj at union.edu
Mon Sep 11 18:10:47 CEST 2000
On Mon, 11 Sep 2000, Malcolm Tester wrote:
> But besides that, you're going to have other problems as well, if
> you use heart_beat() as the mechanism to track that. I'm not a hard-core
> DGD user, so I can say things based on what I've used/seen in LD/Amylaar
> and MudOS, but I assume the basics are the same. heart_beat() has a
> very important function of determining who is "living" and who is not.
Just for clarification, they aren't the same; in fact they're
quite different.
DGD has no heart_beat() function. None. It just has call_out().
If you want a heart beat, you've got to code it in the mudlib.
The 2.4.5 mudlib (which IIRC is what the original poster was
using) handles it in the traditional way. Other DGD mudlibs
don't. Melville, for instance, puts it into the auto object,
so that every object can use heart_beat() if it wants to, not
just living ones. In that case other mechanisms have to be
used to determine what's living and what's not. I believe
that other DGD mudlibs don't have heart beat at all, and you
have to invoke call_out() directly yourself, although I
couldn't name any that are like that offhand.
> If you activate heart_beat() in every object on the game, you will in
> effect call everything living.
Under 2.4.5, yes. Under Melville it would be -every- object.
Under other libs it could be something else.
> heart_beat() tends to be an expensive function to execute.
Depends on the mudlib. For 2.4.5, yes. For Melville, it depends
on what you put into the heart_beat(). If you don't put anything
in, then it runs as fast as any empty call_out() (or at least,
nearly so; it does do some error trapping). If you write your
own mudlib, it can be fast or slow depending on what you put
in there.
However, for any mudlib with more than a few dozen objects,
invoking the same function in all of them at the same time
is going to be problematic. Especially so once they start
swapping out and have to be swapped back in. It's much better
to have each one handle its own updating, and stagger the
cycles, so that the load is distributed over time, rather
than having every object try to update at once. Keep all
necessary centralized information in a (small!) daemon
object, and have each object call into it to get the
information it needs.
Steve Schmidt
"Bill Gates' biggest fear is not that some kid is brewing up the next killer
app in his garage in Kenosha. His biggest fear is that some kid will brew up
the next killer app in his garage in Kenosha and Microsoft won't own it."
Seattle Times, 4/1-7 2000
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list