[MUD-Dev] Ticks?
Hans-Henrik Staerfeldt
hhs at cbs.dtu.dk
Mon Jun 10 12:16:18 CEST 2002
On Fri, 7 Jun 2002, Anderson, David wrote:
> For instance, I'm wondering about ticks. I never did like the
> fact that you can fight a mob for 30-45 seconds or so, your health
> going down, and then suddenly you regen a bit of health. This
> didn't come slowly as your body healed itself, you suddenly just
> "felt better".
> I was thinking about skipping ticks & regenning every round, but I
> was worried about the extra processing that would entail (since
> that would mean I'd also have mobs regenning every round, so
> that'd be thousands of mobs, plus hundreds of players
> someday.. all regenning every couple seconds).
Its really just a question of having a more fine-grained interval to
base your calculations on. I would however urge you to implement the
time management of events with and event queue instead of the static
loop (since youre starting from scratch anyway). It makes things
much easier to manage, and allows you to have arbitrary timed
events.
Note however the more finegrained you set the update interval, the
more CPU power it takes (e.g. giving all characters 0.000001 HP's
every 0.000001 second will be tough on the server).
Yeah, and then you would probably want such stats (e.g. HP)
represented as floating-point (at least internally).
Hans Henrik Stærfeldt | bombman at diku.dk | work: hhs at cbs.dtu.dk |
Address: |___ +45 40383492 __|__ +45 45252471 __|
DTU, Kemitorvet, | Scientific programmer at Center for Biological |
bygn 208, CBS. | Sequence Analysis, Technical University of Denmark|
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list