1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev]  Event handling -->
<!--X-From-R13: Eunja Vnycraal <znynpunvNvanzr.pbz> -->
<!--X-Date: Fri, 09 Jan 1998 17:50:25 +0000 -->
<!--X-Message-Id: Pine.SUN.3.96.980109125351.320B&#45;100000@sun38 -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.PMDF.3.95.980109094922.543180133A&#45;100000#nova,wright.edu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev]  Event handling</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:malachai#iname,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00142.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00143.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00141.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00147.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00144">Author</A>
&nbsp;|&nbsp;<A HREF="#00144">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00144">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev]  Event handling</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev]  Event handling</LI>
<LI><em>From</em>: Shawn Halpenny &lt;<A HREF="mailto:malachai#iname,com">malachai#iname,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 9 Jan 1998 12:56:02 -0500 (EST)</LI>
<LI><em>Reply-To</em>: Shawn Halpenny &lt;<A HREF="mailto:malachai#iname,com">malachai#iname,com</A>&gt;</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Fri, 9 Jan 1998 s001gmu#nova,wright.edu wrote:

&gt; 
&gt; On Thu, 8 Jan 1998, Vadim Tkachenko wrote:
&gt; 
&gt; &gt; s001gmu#nova,wright.edu wrote:

[ snipped since others are capably currently carrying the ball but the
  following was something I'd specially wrestled with in my initial
  design stage ]

&gt; &gt; &gt;   I haven't spent much time on gracefull shut-down of the
&gt; &gt; &gt;   queue, or storing of the event list to rebuild a queue, but
&gt; &gt; &gt;   they are next on the hit parade.  
&gt; &gt; 
&gt; &gt; Two options:
&gt; &gt; 
&gt; &gt; - save the event list and process it on the startup
&gt; &gt; - process all the list on shutdown. But, this situation may be
&gt; &gt;   more difficult because events being processed may produce some
&gt; &gt;   more effects and so on - for example, if you shout (RL) and
&gt; &gt;   then try to 'process the event while shutting down', you're
&gt; &gt;   likely to:  
&gt; &gt; 
&gt; &gt; - Hear the echoes,
&gt; &gt; - Which may, in turn, cause the avalanche,
&gt; &gt; - Which may, in turn, kill a lot of people around,
&gt; &gt; - Which, in turn, creates a LOT of other events to process,
&gt; &gt; - and so on.
&gt; 
&gt; *nod*  good point.  I just realized that one of the other things we
&gt; planned to do would work nicely with saving events and processing them at
&gt; re-start...  We planned on setting it up so that if you logout outside of
&gt; an inn or other "long-term storage" type safe-room, your character just
&gt; sits there...  so, in the event of a... less than expected shutdown, all
&gt; events are saved, all characters out and about are saved as such.  reboot,
&gt; all characters are put back, and all events are reloaded.  Rather nicely
&gt; takes care of problems like "cast fireball boffo" being reloaded with
&gt; neither the caster or the target being around. I can see players being
&gt; unhappy with the way things would work out, though.  It might be better
&gt; to just let the events die.

Does game time pass for your players while they are logged out?
How are your events time-stamped?
Are players outside of long-term storage (the ones just sitting there)
  affected by game events?  Are those within the storage affected?

I ask because I was initially thinking something akin to what you are
describing when I started down the event-driven road.  The reasons I ask
are outlined somewhat:

- Bubba drinks a vial of poison whilst relaxing in a local inn and he
  has his poison bit set for the next 20 minutes--the arbitrary
  duration of the poison (implying that an event is immediately
  scheduled to ripen in 20 minutes that will unpoison Bubba).  
- game is shutdown/crashes/etc. 3 minutes later.  No events are saved.

Our intrepid hero logs back on 5 minutes post-crash and some weeks later
realizes that the poison he swallowed long ago is still with him
since the unpoison event has disappeared.  

Okay, let us save pending events and assume the same above
drink/crash/login happens again.  Remember that poison event now has
to ripen in 12 minutes from when Bubba returns to the game, assuming
that for players, game time only passes for them whilst they're
in-game.  Depending on how you time-stamp your events, the event
manipulations can become interesting.  

So let's say you have a perfect solution for that (something like
saving the time the event was posted as well as the delta from that
time till the ripen time.  When Bubba logs back in, the delta on the
event is modified based on the current time and things continue on). 
Now, 

- assume above poison-drinking, reboot, and saving of pending events
- however, instead of 5 minutes later, Bubba logs back on an hour
  later.  

What to do with the unpoison event that should have ripened 43
minutes ago, but didn't because it was either saved with Bubba and
removed from the game event queue, or was enqueued but Bubba wasn't
logged in so it silently ripened and died.  Sadly, Bubba remains
poisoned.  

Or perhaps you note that the event had to have ripened while Bubba
was logged off, so you'd better ripen it post-haste.  Now your users
complain of the possibly hundreds of events that spam them off
immediately after logging in upon return from their vacations.  All
the effects are still there, just batched.  This isn't necessarily
bad, but (IMO) would be in unconscionably bad taste.  

The above were my prime motivations for keeping all game objects in
the game until they are removed from the DB (i.e.  no longer exist). 
I suppose it is possible to log the player out, but continue to let
any pending events have their way with Bubba's player object, but
what if the poison kills Bubba while he's logged out?  What happens
to the body?  His inventory?  What if the vial Bubba drank wasn't
poison but was a slow-acting agent that gradually caused the imbiber
to come under the complete control of the person originating the
potion?  

(I don't require an answer to those questions, but Greg might :-) ).  

I know that as a player, I would find that anything that happened to
my character while I was logged out (and I'm assuming the general
case with current MUDs that when logged out, the body is no longer
there) would be tremendously unfair.  After all, how can something
affect me if my body isn't in the game?  OTOH, if I was aware that
when I logged out I was only severing my control with that body and
any game element could still affect it, then what happens, happens
unless I took previous steps to prevent it.  

-- 
Shawn Halpenny


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00147" HREF="msg00147.html">Re: [MUD-Dev]  Event handling</A></strong>
<ul compact><li><em>From:</em> Vadim Tkachenko &lt;vadimt#4cs,com&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00141" HREF="msg00141.html">Event handling (was: request for comments)</A></STRONG>
<UL><LI><EM>From:</EM> s001gmu#nova,wright.edu</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00142.html">Re: [MUD-Dev]  OT: DCOM and RMI</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00143.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00141.html">Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00147.html">Re: [MUD-Dev]  Event handling</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00144"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00144"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>[MUD-Dev] Event Handling</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00223" HREF="msg00223.html">[MUD-Dev] Event Handling</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 13 Jan 1998, 03:35 GMT
</LI>
</ul>
<LI><strong><A NAME="00117" HREF="msg00117.html">request for comments (was: Mud-Dev FAQ)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Thu 08 Jan 1998, 16:43 GMT
<UL>
<LI><strong><A NAME="00122" HREF="msg00122.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Thu 08 Jan 1998, 20:13 GMT
<UL>
<LI><strong><A NAME="00141" HREF="msg00141.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 09 Jan 1998, 16:11 GMT
<UL>
<LI><strong><A NAME="00144" HREF="msg00144.html">Re: [MUD-Dev]  Event handling</A></strong>, 
Shawn Halpenny <a href="mailto:malachai#iname,com">malachai#iname,com</a>, Fri 09 Jan 1998, 17:50 GMT
<UL>
<LI><strong><A NAME="00147" HREF="msg00147.html">Re: [MUD-Dev]  Event handling</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 19:02 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00143" HREF="msg00143.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 17:50 GMT
<UL>
<LI><strong><A NAME="00153" HREF="msg00153.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 09 Jan 1998, 21:51 GMT
<UL>
<LI><strong><A NAME="00155" HREF="msg00155.html">Re: [MUD-Dev]  Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Fri 09 Jan 1998, 23:03 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
</LI>
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>