[DGD]Ponderings, by jack handy

Ludger Merkens balduin at uni-paderborn.de
Mon Apr 17 18:17:39 CEST 2000


Hi,
[...]
> 
> I have created a skillbased system that relies on balance or roundtime, and 
> I use the heart beat function to base it on. This brings up a question of 
> resource and design. If I had npc's and pc's both inherit the 
> heartbeat/skill array and create massive amounts npc's and pc's with their 
> own ticks running because they are defined as 'living' objects in the mud, 
> wouldnt that create some sort of effect on resources?
> 
> So then I thought, why not have one central time, and when something queries 
> to go off balance it looks at the current time, and then ticks for the 
> amount I want it to instead of constantly ticking.
> 
This works fine for stuff like recharge, healing and so on. You just store
a timestamp (time() works fine here) when the last query has been executed
and use the time since then to calculate healing, recharging progress
since then.

But it's difficult for decay and movement. Since in the one case you would
call a function in an object that should have been rotten away. And for
movement an object has to be called that is currently not present in the
room. (assume the usual room concept as basis for this idea) 

> Or would that be even more complicated for what its worth, if its even worth 
> anything.

I consider it worth the work, you don't need the call_outs, more objects
can stay swapped-out, and if properly designed (this means if you don't
call heart_beat() 50 times to do the recharge, but calculate the the
progress in one step), it reduces the overall execution cost.

greetings

Ludger


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list