[MUD-Dev] Ticks?
shren
shren at io.com
Wed Jun 12 06:20:52 CEST 2002
On Tue, 11 Jun 2002, Kwon Ekstrom wrote:
> From: "shren" <shren at io.com>
>> On Fri, 7 Jun 2002, Kwon Ekstrom wrote:
>> 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.
> This wouldn't work for me even if I was working in c/c++, I don't
> have "levels" exactly. You could do an attribute check tho, since
> the majority of my regeneration factors are derived from your
> attributes and/or affects. There's alot of factors (including
> where you are) that go into regeneration on my system. I do math
> in increments... your main value based on things like your
> attributes which rarely change updates every so many seconds.
> Then your actual regeneration rate is modified by things like
> spell affects and what room you're in (if you're renting a room at
> an inn you get a rate bonus) those modify a "modifier" affect and
> although they rarely change I keep those separate from the other
> modifiers.
*wince*
We've had a total miscommunication. I don't mean class level, I
mean level like gas gague level. Store x and delta x in a struct,
then have an array of the structs in one memory block, then add
delta x to x every second. That's it. I'm not advocating any
particular mud paradigm, just a different way to store player
variables that change often - in one memory block so one thread can
change them quickly. You could put anything in there - spawn
counters, hps, mana, spell timers - whatever.
_______________________________________________
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