[1138] in Coldmud discussion meeting

root meeting help first first in chain previous in chain previous next next in chain last in chain last

Re: [COLD] How easy is it to animate things in ColdX

daemon@ATHENA.MIT.EDU (Wed Nov 27 12:40:52 1996 )

Date: Wed, 27 Nov 1996 10:20:15 -0700 (MST)
From: Brandon Gillespie <brandon@glacier.cold.org>
To: Frank Crowell <frankc@maddog.com>
cc: Cold Stuff <coldstuff@cold.org>
In-Reply-To: <329ABE2A.208891C1@maddog.com>

On Tue, 26 Nov 1996, Frank Crowell wrote:
> How easy is it to animate objects and NPCs in ColdX?
> Anyone have samples such as triggered events, roving
> NPCs, fuses, and other animated type objects?

How easy is it to do in MOO?

It really depends upon how you approach it.  I would not suggest a tick
model (where every object receives a tick).  What I would suggest is a
trigger/callback system.  Have many reactions trigger based, and have the
creature schedule its own periodic heartbeat.  This way it can devalue its
own heartbeat over time if it is idle (i.e. reduce its heartbeat until
about an hour or so, or completely shutoff)--and have activity turn up the
heartbeat again.  This allows cold to push the inactive object to disk.

Doing a tick model is bad because it is constantly requiring all objects
to be active which demands them to be in memory at all times--thus
increasing the memory profile and object cache.  This works against the
way cold is optimized.

-Brandon Gillespie