[DGD] Speed Up?
Jorn.Bakker at phil.uu.nl
Jorn.Bakker at phil.uu.nl
Mon Apr 7 15:51:24 CEST 2003
Hi there
> You are going to have to tell us more about what you are doing before
> any specific recommendations can be made. I have no idea how "heart"
> and "tick" relate to callouts, the mudlib, and your agent.
>
The MUD I'm working with is based on the Melville MUD-lib. What I know
about 'heart' and 'tick', correct me if I'm wrong, is the following: the
'heart beat' controls the status
of all objects. In the MUD-lib there's a class 'Living' which is inherited
by all living
objects in the MUD including the agent. In this class the 'heart beat' is
used to check
the status of a living being. Then there's the 'tick' function which I use
as a control loop
for non-human living objects. In the code of 'Living' there's something
like this:
heart()
{
this_object()->check_status();
call_out("heart", delay_time1);
}
Where 'check_status()' checks for, among other things, changes in
hitpoints etc.
And the agent looks like this:
inherit Living;
tick()
{
.........
this_object()->do_action(x);
call_out("tick", delay_time2);
}
> Generally speaking, DGD runs LPC threads in sequence, with one having
> to terminate before the next one can be started. A callout delay of 0
> indicates that the next LPC thread should be started as soon as possible
> (immediately, unless there are other LPC threads contending for that
> position) after the current thread has terminated. A sequence of LPC
> threads run in this manner will use all available CPU power for the
> duration of their combined execution.
>
I have tried setting it to zero but it didn't work. Maybe I'm already at
maximum CPU power. But I have a strong feeling that I missed something
important in my code.
Thanks for your help anyway
gr
Jorn
> Regards,
> Dworkin
> _________________________________________________________________
> List config page: http://list.imaginary.com/mailman/listinfo/dgd
>
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list