1997Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Event Handling -->
<!--X-From-R13: @nguna Kbfcr <lbfcrNunjnvv.rqh> -->
<!--X-Date: from major.globecomm.net [207.51.48.5] by mx01.ny.us.ibm.net id 859596041.82593&#45;1 Sat Mar 29 00:40:41 1997 -->
<!--X-Message-Id: Pine.GSO.3.95q.970328143835.15523C&#45;100000@uhunix2 -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Event Handling</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:yospe#hawaii,edu">
</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="msg00252.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00254.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00268.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00250.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00253">Author</A>
&nbsp;|&nbsp;<A HREF="#00253">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00253">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Event Handling</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: Mud Design Mailing List &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: Event Handling</LI>
<LI><em>From</em>: Nathan Yospe &lt;<A HREF="mailto:yospe#hawaii,edu">yospe#hawaii,edu</A>&gt;</LI>
<LI><em>Date</em>: Fri, 28 Mar 1997 14:40:29 -1000</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
Just rewrote my event model. This is a code free explanation of the new
version. Let me know what you think.

The Physmud++ event model functions as follows:

There are three sets of Queues:
Room Queue
Area Queue
Game Queue

Each Queue is executed by its respective local thread. Queues are, for
want of a better unused terminology, (I wish I could use "threads") 
laced with Chains, which can link together a number of Events, killing
the entire chain if one Link goes bad. Sometimes one Event is part of
more than one Chain, and each Event is linked to its constituents, 
killing itself and potentially its Chain if one of those constituents
goes out of scope. For example, most combat related Events are of Room
scope, and die when one member of the Event constituency goes out of
scope. I have been considering making command interpretation an 
interpret at time set, scheduling only one chain of related Events at a 
time on the basis of command interpretation.

Some example Event queues (1/10th second schedules):
 
  0.0 {
} 0.1 {
(Groo draws sword) (1)
(Bell tolls) (2)
} 0.2 {
(Groo hacks at Ungha) (1)
(Urgh runs off screaming) (3)
(Murgh starts muttering) (4)
(Bell tolls) (2)
} 0.3 {
(Groo slashes at Urgh) (1)
(Bell tolls) (2)
} 0.4 {
(Groo makes a flying leap in the direction of Murgh) (1) (5)
(Murgh casts wall of death) (4)
(Bell tolls) (2)
} 0.5 {
(Groo lops in the direction of Murgh's head) (1) (5)
(Murgh ducks) (5)
(Bell tolls) (2)
} 0.6 {
(Groo chops at Buhg) (1)
} 0.7 {
} 0.8 {
} ... {
} 4.9 {
(Load from 30 second queue)
}

Here, Groo could have interupted (1) and (5) when he saw the wall of
death, say, by... well, not much, unless he had a grappling hook. And a
really fast arm. But if he had a trick up his sleeve, he might have done
it. That would have killed the rest of that chain. Incidentaly, the
slash at Urgh was killed when Urgh ran off screaming.

   __    _   __  _   _   ,  ,  , ,  
  /_  / / ) /_  /_) / ) /| /| / /\            First Light of a Nova Dawn
 /   / / \ /_  /_) / \ /-|/ |/ /_/            Final Night of a World Gone
Nathan F. Yospe - University of Hawaii Dept of Physics - yospe#hawaii,edu


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00252.html">Re: Resets and repops (a really short post)</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00254.html">Re: Mixture</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00268.html">Greetings. :)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00250.html">Efficiency</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00253"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00253"><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><A NAME="00261" HREF="msg00261.html">A brief introduction.. ok, you got me: an introduction</A></strong>, 
Greg Munt <a href="mailto:greg#uni-corn,demon.co.uk">greg#uni-corn,demon.co.uk</a>, Sun 30 Mar 1997, 09:01 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00265" HREF="msg00265.html">Re: A brief introduction.. ok, you got me: an introduction</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#user1,inficad.com">nightfall#user1,inficad.com</a>, Mon 31 Mar 1997, 12:20 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00259" HREF="msg00259.html">Greetings. :)</A></strong>, 
Michael Hohensee <a href="mailto:michael#sparta,mainstream.net">michael#sparta,mainstream.net</a>, Sat 29 Mar 1997, 22:10 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00268" HREF="msg00268.html">Greetings. :)</A></strong>, 
claw <a href="mailto:claw#null,net">claw#null,net</a>, Tue 01 Apr 1997, 09:21 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00253" HREF="msg00253.html">Event Handling</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Sat 29 Mar 1997, 08:40 GMT
<LI><strong><A NAME="00250" HREF="msg00250.html">Efficiency</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Sat 29 Mar 1997, 04:15 GMT
<LI><strong><A NAME="00226" HREF="msg00226.html">Dupes</A></strong>, 
coder <a href="mailto:coder#ibm,net">coder#ibm,net</a>, Thu 27 Mar 1997, 12:15 GMT
<LI><strong><A NAME="00212" HREF="msg00212.html">VT102 codes</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#inficad,com">nightfall#inficad,com</a>, Wed 26 Mar 1997, 12:53 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00213" HREF="msg00213.html">Re: VT102 codes</A></strong>, 
Adam Wiggins <a href="mailto:nightfall#inficad,com">nightfall#inficad,com</a>, Wed 26 Mar 1997, 13:39 GMT
</LI>
</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>