[MUD-Dev] Re: atomic functions

Chris Gray cg at ami-cg.GraySage.Edmonton.AB.CA
Wed May 13 23:35:14 CEST 1998


[Jon A. Lambert:]

:I suppose it is possible for a main/timer event to check on "dead" 
:objects on a regular basis and reanimated them.  Does this solve the 
:problem or just hide failures in the application event model?
:Or is this simply a reincarnation of the Diku-esque big polling loop?

You could do that, but if the reason for the event chain dying has not
gone away, nothing much would be accomplished. I suspect it isn't any
harder to simply have the event code itself check to see if it can or
does work, and have alternatives if it doesn't.

A couple of my specific NPC's often just wander at random. They do that
by randomly choosing from among the "obvious exits" from their current
location, and trying to move in that direction. If that fails, they cycle
the directions until they have tried all obvious ones. At that point, they
could just die away, but instead I merely log a message and retrigger their
main event, but with a much larger delay than normal. Such simple tactics
may well serve nearly all cases. This particular problem only happens when
someone with builder privileges in the area inhabited by the NPC manages to
make a room with no exits. That is often just a temporary situation (e.g.
the area is under construction), so the simple solution works.

--
Chris Gray   cg at ami-cg.GraySage.Edmonton.AB.CA


--
MUD-Dev: Advancing an unrealised future.



More information about the mud-dev-archive mailing list