[MUD-Dev] Ticks?

shren shren at io.com
Mon Jun 17 09:17:04 CEST 2002


On Fri, 14 Jun 2002 Daniel.Harman at barclayscapital.com wrote:
> From: shren
 
>> Of course, if you're compulsively going for speed, and are doing
>> things in C or C++, you can always stick everything that
>> regenerates on a tick in the same memory block, in two parts -
>> the rate and the current level.  Then the tick thread can live in
>> that memory block and not even look at the whole player.

>> It's probably not the best way, but something about this
>> particular inelegance I find elegant.  I wonder if it would help
>> speed, and by how much, and how much of a pain in the arse it
>> would be to code.

> Downside is that its just ghastly to maintain (referencing issues,
> inserting new players/mobs into the list...). I could see it being
> an option if you were really struggling with CPU time, and it was
> all being burnt up by regen ticks, but only as a last resort
> optimisation. I'm guessing the 80/20 rule would probably say this
> is a waste of time and when you are up at 3am debugging some issue
> with player/mob hp for the 30th time, you might agree ;)

In any case, it'd probably be better done through an event system.
Writing your own event system would be easier to debug than this,
and probably just a bit slower, if slower at all.

_______________________________________________
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