Re: Event Driven Server

From: Pink Floyd (floyd@south.mit.edu)
Date: 11/16/95


I noticed you store pointers to victim, object, etc..   How do you deal with
a char or vict logging out, or an obj/mob being deleted, after the event has
been loaded but before it has been executed?  I have imped my own events queue
and have been toying with the idea of having every char, mob, and obj have
a pointer to a linked list that points to every event that they are loaded
for.  The other option is, on the freeing of a char/obj, to go through the 
whole event queue and compare every pointer to see if it matches.
Another option I had was to not store any of those pointers, but to keep a
copy of the original argument that the char typed (all queue events originally
come from a ACMD function) and just parse the argument every time that event
gets called (and if it loads a new stage into the queue, say in a 4 stage 
spell-casting thing, re-parse the argument for each stage).  This allows for 
mobs leaving the room in the middle of having a spell cast at them, or players
logging out while someone is backstabbing them, etc.  Which do you think would 
be more efficient, parsing the arg everytime or having every char have a 
linked list of pointers to every event queue of which they are a part?

(I hope this isn't too incoherent.)

By the way, I am also planning on having combat in the queue, so there are no
combat ticks, everyone attacks at their own rate which is a function of many
things.  I can control the action down to the 1/10 of a second, but I was
wondering if this would produce way to much spam (like, making a prompt in 
between every attack in the room might cause way too much spam). Any 
suggestions?



This archive was generated by hypermail 2b30 : 12/07/00 PST