1999Q2/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] Text Parsing -->
<!--X-From-R13: Oqnz Ivttvaf <nqnzNnatry.pbz> -->
<!--X-Date: Thu, 10 Jun 1999 15:41:44 &#45;0700 -->
<!--X-Message-Id: Pine.SGI.3.96.990610153728.18613A&#45;100000#zazu,angel.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: Pine.LNX.4.04.9906101337510.935&#45;100000#marcus,pants.nu -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] Text Parsing</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:adam#angel,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="msg00720.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00722.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00715.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00717.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00721">Author</A>
&nbsp;|&nbsp;<A HREF="#00721">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00721">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] Text Parsing</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Subject</em>: Re: [MUD-Dev] Text Parsing</LI>
<LI><em>From</em>: Adam Wiggins &lt;<A HREF="mailto:adam#angel,com">adam#angel,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 10 Jun 1999 15:40:57 -0700 (PDT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</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 Thu, 10 Jun 1999, Katrina McClelan wrote:
&gt; On Thu, 10 Jun 1999, Adam Wiggins wrote:
&gt; &gt; Then at the top of act(), which is the routine which get called to turn the
&gt; &gt; markup language into text that everyone in the room can see, I simply checked
&gt; &gt; to see if num_pcs_in_room was greater than zero.  If not, I just returned without
&gt; &gt; doing any processing.  This made quite a difference; up until then it had been
&gt; &gt; constructing the "You leave north" and "A hobbit arrives from the south" strings
&gt; &gt; every time a mobile moved, whether a PC was present or not.
&gt; 
&gt; This works, except that you then don't get full information when you snoop
&gt; a mob... oh yeah... can't do that in standard diku  ;)  (not that you
&gt; couldn't code around this limitation and still "blind" the mobs in
&gt; the general case anyway)

Well, it was actually based on Circle, so it did have snooping.

And actually, I did acount for this - num_pcs_in_room was actually a count
of the active *descriptors* in the room, not the number of !IS_NPC(ch)'s.

So if I switched out of my immort's body and into a hobbit, it decremented
the num_pcs_in_room where my body was, and incremented it in the room with the
hobbit.

&gt; &gt; I also staggered the way that things happened; at the time, most all of the game
&gt; &gt; updating happened on the "tick" mark (every 60 seconds), which caused a slowdown
&gt; &gt; right then.  I made an "object tick", a "character tick", and so forth.
&gt; &gt; By the same token, mobiles, which previous updated every 3 seconds (all of them),
&gt; &gt; I changed to update every second.  However, not *all* of them would update, only
&gt; &gt; about 1/3rd.  I'd just save the linked list pointer until the next second, and
&gt; &gt; pick up where I left off.  When it got to the end it would loop around again.
&gt; &gt; 
&gt; 
&gt; An informative note that this works because the standard game look checks
&gt; start time, and end time, and the last thing it does is sleep for the
&gt; remainder of 1/4 second.  If your one loop takes longer than 1/4 second,
&gt; then you get server side lag.  However if you distribute the computing
&gt; over multiple loops that use less than 1/4 second you don't notice the
&gt; high load on the client side.  Only adding this because I had a mud once
&gt; reject this optimization arguing that it didn't save any CPU time.
&gt; Truthfully it doesn't save any computing time.  It does help with
&gt; server lag however.

Correct.  Thanks for the clarification.

And actually, I think that Circle uses 1/10th of a second pulses, which gives you
an even smaller time sliver.  To help pin down heavy cycles, I had it spit out
a log message whenever it exceeded its 1/10th of a second on a cycle.

Adam W.




_______________________________________________
MUD-Dev maillist  -  MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>


</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="00715" HREF="msg00715.html">Re: [MUD-Dev] Text Parsing</A></STRONG>
<UL><LI><EM>From:</EM> Katrina McClelan &lt;kitkat#marcus,pants.nu&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00720.html">[MUD-Dev] Stockmarkets...</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00722.html">Re: [MUD-Dev] Text Parsing</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00715.html">Re: [MUD-Dev] Text Parsing</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00717.html">Re: [MUD-Dev] Text Parsing</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00721"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00721"><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>Re: [MUD-Dev] Text Parsing</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00654" HREF="msg00654.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Thu 10 Jun 1999, 01:43 GMT
<UL>
<LI><strong><A NAME="00679" HREF="msg00679.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Matthew Mihaly <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 10 Jun 1999, 06:13 GMT
<UL>
<LI><strong><A NAME="00709" HREF="msg00709.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Thu 10 Jun 1999, 18:43 GMT
<UL>
<LI><strong><A NAME="00715" HREF="msg00715.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Katrina McClelan <a href="mailto:kitkat#marcus,pants.nu">kitkat#marcus,pants.nu</a>, Thu 10 Jun 1999, 21:57 GMT
<UL>
<LI><strong><A NAME="00721" HREF="msg00721.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Thu 10 Jun 1999, 22:41 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00717" HREF="msg00717.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Matthew Mihaly <a href="mailto:diablo#best,com">diablo#best,com</a>, Thu 10 Jun 1999, 22:15 GMT
<UL>
<LI><strong><A NAME="00722" HREF="msg00722.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Thu 10 Jun 1999, 22:55 GMT
</LI>
<LI><strong><A NAME="00727" HREF="msg00727.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Katrina McClelan <a href="mailto:kitkat#marcus,pants.nu">kitkat#marcus,pants.nu</a>, Fri 11 Jun 1999, 01:35 GMT
<UL>
<LI><strong><A NAME="00745" HREF="msg00745.html">Re: [MUD-Dev] Text Parsing</A></strong>, 
Jon A. Lambert <a href="mailto:jlsysinc#ix,netcom.com">jlsysinc#ix,netcom.com</a>, Fri 11 Jun 1999, 05:52 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</LI>
</UL>
</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>