1998Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Event handling (was: request for comments) -->
<!--X-From-R13: [ngg Qunggreyrl <ebbgNzcp.qla.zy.bet> -->
<!--X-Date: Mon, 12 Jan 1998 10:02:33 +0000 -->
<!--X-Message-Id: Pine.LNX.3.96.980112092324.444B&#45;100000#mpc,dyn.ml.org -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199801112043.MAA04583#under,Eng.Sun.COM -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Event handling (was: request for comments)</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:root#mpc,dyn.ml.org">
</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="msg00206.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00208.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00195.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00210.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00207">Author</A>
&nbsp;|&nbsp;<A HREF="#00207">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00207">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Event handling (was: request for comments)</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 (was: request for comments) </LI>
<LI><em>From</em>: Matt Chatterley &lt;<A HREF="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</A>&gt;</LI>
<LI><em>Date</em>: Mon, 12 Jan 1998 09:31:24 +0000 (GMT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:neddy#itl,net">neddy#itl,net</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Sun, 11 Jan 1998, JC Lawrence wrote:
&gt; On Fri, 9 Jan 1998 13:51:24 PST8PDT 
&gt; s001gmu &lt;s001gmu#nova,wright.edu&gt; wrote:
&gt; &gt; On Fri, 9 Jan 1998, Vadim Tkachenko wrote:
&gt; 
&gt; &gt; *nod* our end goal is to not make it obvious to the player that the
&gt; &gt; game is turn based, but the underlying mechanics will be.  The more
&gt; &gt; that I think about it, the less I like the 'tick' idea... Why
&gt; &gt; artificially impose a less granular clock on top of the system
&gt; &gt; clock?  Why not just let the system clock determine the timing?
&gt; &gt; Situations where the character's speed should be far faster than the
&gt; &gt; players typing speed (IE: combat, etc), can (and should?) be handled
&gt; &gt; by the computer (IE: the computer is generating the events, not
&gt; &gt; player commands).  All other commands don't need to be turn-based,
&gt; &gt; as speed has already been deemd uniportant by the designer (me), by
&gt; &gt; that system not being coded as an auto-generated event.
&gt; 
&gt; This sounds very much like the the argument I went thru with myself.

And very similar to one that my design team went through. The solution
which we came up with was to use variable length combat 'command entry'
and 'execution' rounds. Command entry rounds (CER) allow players to enter
the things they would like to be doing during the next Execution round
(ER). CERs last 10 seconds on average, and ERs for an unspecified number
of 5 second periods (depending on how much is to be done).

Each player has a number of 'action points' which dictate the amount of
things he can do in a round (for instance if a kick costs 10 and a punch
5, and he has 30, he can kick three times or punch six), and each action
has an associated initiative. For each action, the initiative is arranged,
and when the next ER arrives, they are executed in this order.

Example: Bubba and Biffo are having a friendly bout of combat (first to
score three hits wins).

CER1: They each have 30 action points, a kick is 12 and a punch 9,
initiative 3 and 2 respectively.

Bubba queues kick, punch, punch (30 action points, init 3, 2, 2).
Biffo queues punch, kick, punch (30 action points, init 2, 3, 2).

Biffo gets the first swing, and punches Bubba.
	Since Biffo's second action initiative is 5 from the start (or 3
	from the *end* of his punch), Bubba's kick is next.
Bubba kicks Biffo.
	Now they *both* have an action at the same time (5 from the
	start), so random factors and other deciders are called in.
Bubba punches Biffo.
Biffo kicks Bubba.
	The same happens again! They both go at the same time and..
Biffo punches Bubba. Biffo wins!
 
[Snip]

&gt; &gt; *nod* I think I see where you are going.. the event, "cast spell" is
&gt; &gt; plunked on the queue, and handled as quickly as possible.  Handling
&gt; &gt; means calling a method which may "sleep" for a while, to take care
&gt; &gt; of the delay.  
&gt; 
&gt; Ouch -- that's a very expensive route.  Cheaper:
&gt; 
&gt;   The initial event parses the "cast fireball" command and logs an
&gt; event to try and cat the fireball.

Interestingly enough my cast command will defer to a special setup which
reads in the spell 'script' from file (this allows players to use a
special front end to research and create their own spells).
 
&gt;   That event then runs aaaaaaaaand determines if a fireball can be
&gt; cast, and when.  It then logs a new event to cast the fireball then.
&gt; 
&gt;   That event then ripens in XXX time and the fireball is cast.  

Basically things happen after a time with little or no association to each
other by default unless specifically implied (for instance a
counter-action would be connected to the original action).
 
&gt; Nothing goes to sleep, no resources are wasted, all the events are of
&gt; minimal size and resource loading.

Sounds good.
 
&gt; &gt; If it's interrupted while sleeping (someone interrupts bubba casting
&gt; &gt; the spell), you have some sort of 'interuppted' method which handles
&gt; &gt; the results of someone busting up bubba's concentration.  Right?
&gt; 
&gt; This gets tricker.  THe above format forces all events into the
&gt; structure of:
&gt; 
&gt;   1) Check that the event is still valid (the event is to do X, and X
&gt; is still possible? ("Hit Bubba" and Bubba is no longer present)).

Yup.

[Snip]

Regards,
	-Matt Chatterley
	ICQ: 5580107
"We can recode it; we have the technology."


</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<!--X-Follow-Ups-End-->
<!--X-References-->
<UL><LI><STRONG>References</STRONG>:
<UL>
<LI><STRONG><A NAME="00195" HREF="msg00195.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
<UL><LI><EM>From:</EM> JC Lawrence &lt;claw#under,Eng.Sun.COM&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00206.html">Re: [MUD-Dev] Guilds &amp; Politics [was Affecting the World]</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00208.html">Re: [MUD-Dev]  OT: DCOM and RMI</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00195.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00210.html">Event handling (was: request for comments)</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00207"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00207"><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 - some definitions</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00222" HREF="msg00222.html">[MUD-Dev]  Event handling - some definitions</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Tue 13 Jan 1998, 00:55 GMT
</LI>
<LI><strong><A NAME="00245" HREF="msg00245.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Fri 16 Jan 1998, 04:31 GMT
<LI><strong><A NAME="00246" HREF="msg00246.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Fri 16 Jan 1998, 15:35 GMT
</LI>
</LI>
</ul>
<LI><strong><A NAME="00195" HREF="msg00195.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sun 11 Jan 1998, 20:44 GMT
<UL>
<LI><strong><A NAME="00207" HREF="msg00207.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
Matt Chatterley <a href="mailto:root#mpc,dyn.ml.org">root#mpc,dyn.ml.org</a>, Mon 12 Jan 1998, 10:02 GMT
</LI>
<LI><strong><A NAME="00210" HREF="msg00210.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 15:13 GMT
</LI>
<LI><strong><A NAME="00220" HREF="msg00220.html">Event handling (was: request for comments)</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Mon 12 Jan 1998, 22:12 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</ul>
<LI><strong><A NAME="00169" HREF="msg00169.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
JC Lawrence <a href="mailto:claw#under,Eng.Sun.COM">claw#under,Eng.Sun.COM</a>, Sat 10 Jan 1998, 03:53 GMT
<UL>
<LI><strong><A NAME="00214" HREF="msg00214.html">Re: [MUD-Dev] Event handling (was: request for comments)</A></strong>, 
Vadim Tkachenko <a href="mailto:vadimt#4cs,com">vadimt#4cs,com</a>, Mon 12 Jan 1998, 17:54 GMT
</LI>
</UL>
</LI>
</ul>
</ul>
</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>