1998Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev] Re: [IDEAS] Starting from scratch -->
<!--X-From-R13: Oqnz Ivttvaf <nqnzNnatry.pbz> -->
<!--X-Date: Fri, 11 Sep 1998 11:34:12 &#45;0700 -->
<!--X-Message-Id: Pine.SGI.3.96.980911110131.28611B&#45;100000#zazu,angel.com -->
<!--X-Content-Type: text/plain -->
<!--X-Reference: 199809110233.TAA08090#under,engr.sgi.com -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev] Re: [IDEAS] Starting from scratch</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="msg01017.html">Previous</a>
&nbsp;|&nbsp;<a href="msg01019.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg01010.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00494.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#01018">Author</A>
&nbsp;|&nbsp;<A HREF="#01018">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#01018">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev] Re: [IDEAS] Starting from scratch</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>: [MUD-Dev] Re: [IDEAS] Starting from scratch </LI>
<LI><em>From</em>: Adam Wiggins &lt;<A HREF="mailto:adam#angel,com">adam#angel,com</A>&gt;</LI>
<LI><em>Date</em>: Fri, 11 Sep 1998 11:38:21 -0700 (PDT)</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#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 Sep 1998, J C Lawrence wrote:
&gt; Franklyn Colebrooke,&lt;colebrookef#post,uwstout.edu&gt; wrote:
&gt; &gt; The idea I have in mind is to create a server that robust
&gt; &gt; enough to do several things: 1. maintain quality connections with
&gt; &gt; players in such a manner that it will actively ping the players and
&gt; &gt; drop anyone within the admin's described margins. If not drop them,
&gt; &gt; then to put them on a holding queue until the connection improves.
&gt; 
&gt; Translation: Attempt to handle network lag and latency in an
&gt; intelligent manner.  

This is a tough one.  In the end, having a slow connection will suck for
the client, no matter what you do.  But there are a few neat tricks which
can alliviate their misery a small bit.

&gt; There are a whole lot of possible approaches, all with trade-offs.
&gt; One of the old standards is using dead recking and other predictive
&gt; algorithms to update client displays with where other objects are
&gt; likely to be along with what they are likely to be doing (much tougher
&gt; -- definite AI candidate).  This allows the frequency and accuracy of
&gt; inter-client updates to fall without (significantly) impacting the
&gt; perceived responsiveness of the game.
&gt; 
&gt;   The problem of course are the "jumps" when the predicted states are
&gt; resolved against the actual states (eg local client lags, predicts
&gt; motions of other options, comes out of lag and finds that its
&gt; predictions were not accurate, ditto for remote clients and your
&gt; perception of them).  NB This bas heeb discussed (briefly) in the
&gt; archives along with such concepts as how to resolve critical events
&gt; (does a missile impact an enemy ship or not when the position of both
&gt; is possibly predictive), and with the use of non-error correcting
&gt; protocols to allow cheap fail-overs and predictive kick-in for lost
&gt; frames.

...in effect, the code the client is running is very similar, perhaps
identical, to that the server is running - it just knows a lot less about
the game world, and always defers to the server in case of disagreement.

&gt; But, getting back to your prorposal of degrading the player's state in
&gt; the game world dependant on the state of his net connection: You're
&gt; asking for trouble.  Not technically mind you, but socially.  Players
&gt; will notice the feature, will come to rely on it, and will then find
&gt; it doesn't work.  Why doesn't it work?  Its unreliable.  Latency
&gt; changes are highly transitory and typically have extremely sharp
&gt; corners (ie they don't build up or fall down slowly -- they're
&gt; typically instant on/off situations, square waves as it were).  This
&gt; means that unless your sample happens to hit during the event you
&gt; won't detect it.  This also means you either sample with a very high
&gt; frequency (and drown those on slow connections and cause your own lag
&gt; conditions thru bandwidth consumption) or sample infrequently and
&gt; accept fairly bad average cases of undetected lag.

I think you can choose sample times which will get you enough information
to work with: ie, if a certainly player has consistantly getting sharp
connection hangups which last multiple seconds with no packet
comminucation whatsoever, the game could choose to not let them into a
high-speed area (say, a quake-style arena), or it could be as simple as a
lag-o-meter that the player can check.  That is to say, in a text mud
people have a very good feel for their connection, sine they see the
content of the packets arrive directly.  Frequently people will say, "No,
I don't want to go to high-level area X right now...I'm lagging too hard
and will probably get into trouble."  In a game which is translating
packets into more subtle data and doing motion prediction, the game
continues to run at 30fps even when there are no packets coming in.  Thus
the player doesn't have a feel for what kind of lag they are in until they
start shooting at things and missing because they aren't where they think
they are.

&gt; Further, the main "lag" problem with telnet-based MUD clients
&gt; (actually with TCP based clients) is not actually lag.  Its dropped
&gt; packets.  The old classic of the telnet session hanging for several
&gt; seconds before "coming back to life" is not caused by lag (ie high
&gt; ping time) but by one of the telnet packets being lost en route, the
&gt; protocol having to wait until timeout, and the packet to be resent
&gt; (successfully).  During this whole time the average ping time between
&gt; the ends can approximate 0ms.
&gt; 
&gt; Translation: The problem is in TCP, not in 'net routing and traffic
&gt; storms.  Your problem is to decide whether or not data correctness (no
&gt; dropped or lost packets) is more important than responsiveness, or
&gt; even whether you can't multiplex your data connections and
&gt; multi-thread your state machines to asynchronously accept updates from
&gt; your data connections and thus allow your data connections to rely on
&gt; TCP error correction.

I was futzing around with UDP a few months back after chatting with some
folks about it at CGDC.  IMO as soon as you go to a non-text based system
where packets are more of an object-update style, UDP can solve a lot of
problems for you.  I doesn't guarentee in-order devivery, or even delivery
at all.  However, in a realtime simulation, you could care less about
where an object was ten seconds ago - what you care about is where it is
*now*, and waiting for the old packets that didn't make it to get resent
is a waste of time.  Consider:

  Buffy is flying her sandskimmer due east across the desert.
  Boffo is observing.
  Buffy veers to the left.
  Server sends a packet to Boffo to indicate Buffy's new position and
direction of motion.
  On the way to Boffo's machine, the server's update packet about Buffy's
position gets hung up.
  Buffy veers to the right.
  Server sends a new packet with Buffy's new position and direction of
motion.

At this point neither the client nor the server cares about that hung-up
packet making it through; but with TCP, you have to wait for it.  With UDP
you can just forget about it.

This, of course, assumes that the objects complete state is stored in each
packet.  If packets are more like state deltas (ie, "I just turned left",
"I just moved forward") this won't work.

Although this isn't terribly useful for a traditional text-based mud, you
could probably still get some net optimization with a custom client using
UDP, doing its own ack'ing.  Sending messages in packet-sized chunks with
predictable id numbers (ie, each one is the previous id + 1), you could
avoid the massive resending you get with TCP when the net gets hung up,
since TCP actually restarts at the first unacked byte.  If you packetized
it, you could queue up a set of received messages until ever message up to
a certain number has been received.

For example:

   Server fires messages 1, 2, 3, 4, 5 and 6 to the client.

   Client receives messages 1, 4, and 5.  It sends a status message to the
server indicating it has recieved messages 2 - 3 and the highest message
it has received is 5.  It outputs message 1 to the player and queues up 4
and 5.

   Server resends 2 and 3.

   Client receives 2 and 3 and outputs them to the user, along with 4 and
5 (since all the intervening packets have been resolved).

   Server times out (highest packet received == 5, highest packet sent ==
6) and resends message 6.


I doubt this would be worthwhile if you're doing straight text, since
distribution a telnet which looks effectively just like telnet (to the
user) and works only with your mud and only for the platforms you happen
to have access to would be a big deterent from people playing your game.
But if you already have a client which is largely based on scrolling text
(such as that old TSN game, Shadow of Yserbius), you might as well.

&gt; &gt; 2. I would like to be able to attach muds to the server as nodes. 
&gt; 
&gt; Why not run a simple front-end daemon which mrely accepts connections
&gt; and then in turn opens connections to the actual MUD server via
&gt; streams or some other high-speed low-overhead IPC mechanism?  This way 
&gt; the MUD can go down for whatever reason, come back up, poll the
&gt; front-end, and re-establish all its connections transparently.

I recommend an archive search for "Armageddon" and "uncrashable".

&gt; I'll leave the questions of retaining or regenerating server and
&gt; character state across such re-connects to you or a lter discussion.

Also mentioned in the "uncrashable mud" thread.

&gt; &gt; I've also had ideas of having the mud itself have the basics(number
&gt; &gt; of levels, max players, number of races, etc) be read from an ini
&gt; &gt; file. 
&gt; 
&gt; What possible advantage dores working from an INi file give you over
&gt; any other data storage format?

I assume he meant a generic initialization file of some sort, the actual
format is probably not terribly relevant.

Adam




</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="01010" HREF="msg01010.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></STRONG>
<UL><LI><EM>From:</EM> J C Lawrence &lt;claw#under,engr.sgi.com&gt;</LI></UL></LI>
</UL></LI></UL>
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg01017.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg01019.html">[MUD-Dev] Off-topic! Re: Windows-&gt;Linux TCP/IP stack performance problems</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg01010.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00494.html">[MUD-Dev] Secrets of the Game Designers</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#01018"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#01018"><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] Re: [IDEAS] Starting from scratch</STRONG>, <EM>(continued)</EM>
<ul compact>
<ul compact>
<ul compact>
<LI><strong><A NAME="00623" HREF="msg00623.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></strong>, 
Matt Chatterley <a href="mailto:matt#mpc,dyn.ml.org">matt#mpc,dyn.ml.org</a>, Mon 10 Aug 1998, 10:47 GMT
</LI>
</ul>
<LI><strong><A NAME="00532" HREF="msg00532.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></strong>, 
Adam Wiggins <a href="mailto:adam#mail,angel.com">adam#mail,angel.com</a>, Thu 06 Aug 1998, 18:26 GMT
</LI>
</ul>
<LI><strong><A NAME="00520" HREF="msg00520.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></strong>, 
Ross Nicoll <a href="mailto:rnicoll#calmar-mud,com">rnicoll#calmar-mud,com</a>, Thu 06 Aug 1998, 15:20 GMT
</LI>
<LI><strong><A NAME="01010" HREF="msg01010.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></strong>, 
J C Lawrence <a href="mailto:claw#under,engr.sgi.com">claw#under,engr.sgi.com</a>, Fri 11 Sep 1998, 02:34 GMT
<UL>
<LI><strong><A NAME="01018" HREF="msg01018.html">[MUD-Dev] Re: [IDEAS] Starting from scratch</A></strong>, 
Adam Wiggins <a href="mailto:adam#angel,com">adam#angel,com</a>, Fri 11 Sep 1998, 18:34 GMT
</LI>
</UL>
</LI>
</ul>
</LI>
<LI><strong><A NAME="00494" HREF="msg00494.html">[MUD-Dev] Secrets of the Game Designers</A></strong>, 
s001gmu <a href="mailto:s001gmu#nova,wright.edu">s001gmu#nova,wright.edu</a>, Wed 05 Aug 1998, 16:51 GMT
<LI><strong><A NAME="00493" HREF="msg00493.html">[MUD-Dev] Re: 3D World Models</A></strong>, 
S. Patrick Gallaty <a href="mailto:choke#sirius,com">choke#sirius,com</a>, Wed 05 Aug 1998, 16:12 GMT
<LI><strong><A NAME="00489" HREF="msg00489.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 05 Aug 1998, 13:29 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00490" HREF="msg00490.html">[MUD-Dev] Re: Socket-Script: Socket-capabable script language and matching library</A></strong>, 
Chris Gray <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 05 Aug 1998, 13:33 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>