[DGD] Nasty Problem - Please Help
Shevek
shevek at btinternet.com
Mon Mar 11 16:46:44 CET 2002
>The answer is, indeed, no. But you can add it very quickly if
>you want it.
<Snip>
>The reason Melville does not provide built-in support for room
>resets is because DGD allows for persistence and it's not clear
>what sort of room reset, if any, would be appropriate in a game
>that had persistence. Something to think about.
>
>Steve/Mobydick
One possibility is to have some form of room daemon that simply clears out
any rooms that have expired beyond reset only if they don't contain
anything. In that scenario the room registers itself on creation with the
daemon and indicates how long to go without reset and if the room can be
removed. Then the daemon (Which hangs around on a long call_out) just runs
through its list of rooms, at say 10 rooms every pass to stop it sucking up
ticks, and resets any that are beyond their reset time, and destructs any
that aren't in use and can be removed (Ie Are flagged as removable, have no
players, mobile NPCs etc). That should keep the number of rooms that are
active down to a bare minimum, with anything not active being created as
player's enter, helping out with mud resources.
You can take that daemon idea and make its policies as complex as you like
and have the effects reproduced throughout the whole mud as opposed to
recoding individual rooms (This is probably used in quite a few libs).
Possibly the most elegant expression of this is to code your object manager
in such a way that it not only keeps track of object issues but also keeps
track of all object resets/removals etc. In that scheme everything
(Rooms/players/NPCs etc) get treated in the same way, as simple objects
that flag themselves up as resetting/removable etc on creation. I guess it
might even help out with creating new issues of objects as you could check
if an object is a reseting type, and simply flag it to do a recompilation
on the next reset instead of an ordinary reset, thereby making it current
issue without the object manager recompiling it immediately.
Hope that makes some sense, it seemed clear until I read through it again :>
Cheers,
Shevek
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list