1997Q3/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: [MUD&#45;Dev]  Quad&#45;trees/Oct&#45;trees -->
<!--X-From-R13: "Rna Oezfgebat" <bevbaNcvkv.pbz> -->
<!--X-Date: Thu, 14 Aug 1997 11:39:25 +0000 -->
<!--X-Message-Id: 199708141139.BAA23950#mail,pixi.com -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, [MUD-Dev]  Quad-trees/Oct-trees</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:orion#pixi,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="msg00550.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00552.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00601.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00552.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00551">Author</A>
&nbsp;|&nbsp;<A HREF="#00551">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00551">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>[MUD-Dev]  Quad-trees/Oct-trees</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#null,net">mud-dev#null,net</A>&gt;</LI>
<LI><em>Subject</em>: [MUD-Dev]  Quad-trees/Oct-trees</LI>
<LI><em>From</em>: "Dan Armstrong" &lt;<A HREF="mailto:orion#pixi,com">orion#pixi,com</A>&gt;</LI>
<LI><em>Date</em>: Thu, 14 Aug 1997 01:36:22 -1000</LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
On Thursday, August 07, Michael Hohensee wrote:

&gt; Dan Armstrong wrote:
&gt; 
&gt; &gt; For storing objects I use a tree that is twenty levels high, based
&gt; &gt; on the following pattern.  Each level in the tree, except for the
&gt; &gt; last, holds four smaller pieces of the tree.  If any of those four
&gt; &gt; are null, then there aren't any objects in the area covered by
&gt; &gt; that piece.  The last level in the tree is either null if nothing
&gt; &gt; is there, or points to the head object of a linked list of every
&gt; &gt; item that is at that location.
&gt; 
&gt; Sounds like a quad tree, based on what little understanding I have of
&gt; these "formal" definitions. :)
&gt; 
&gt; You could probably modify this to work in three dimensions, by turning
&gt; it into an oct-tree (each level holds eight smaller pieces of the tree).
&gt; 
&gt; There's just one problem.  What do you do if some enterprising (read:
&gt; mischevious) player drops one object in each four (or eight) room
&gt; cluster?  That'd cause your tree to create over 2^38 entries in the tree
&gt; to deal with them.  Of course, there probably aren't that many objects
&gt; around, but even on a smaller scale, this looks like it could become
&gt; expensive. 

This enterprising player would first need to find that many objects.  The
most available source of many objects would have to be coins.  They
could walk around dropping one coin about every four or five steps, but
I see this as a self remedying problem.

If they chose to try and drop enough objects to fill the world, and
succeeded, it would take about nine trillion bytes of ram, just to point
to the objects.  Considering that an array takes four trillion, and doesn't
include an easy way of finding the position of a given object without
storing its coordinates, I don't feel too bad about this method.

Any way I look at it, it seems expensive.  I'm just trying to compress
the empty space the best I can without excessive loss in speed and
keep the game small enough for today's computers to handle.

Dan Armstrong



</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="msg00550.html">[MUD-Dev]  Introduction</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00552.html">[MUD-Dev]  Quad-trees/Oct-trees</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00601.html">Re: [MUD-Dev]  Spellcaster, or Waving Hands</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00552.html">[MUD-Dev]  Quad-trees/Oct-trees</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00551"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00551"><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]  Spellcaster, or Waving Hands</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00583" HREF="msg00583.html">Re: [MUD-Dev]  Spellcaster, or Waving Hands</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 14 Aug 1997, 22:21 GMT
<UL>
<LI><strong><A NAME="00587" HREF="msg00587.html">Re: [MUD-Dev]  Spellcaster, or Waving Hands</A></strong>, 
Richard Woolcock <a href="mailto:KaVir#dial,pipex.com">KaVir#dial,pipex.com</a>, Thu 14 Aug 1997, 23:06 GMT
<UL>
<LI><strong><A NAME="00612" HREF="msg00612.html">Re: [MUD-Dev]  Spellcaster, or Waving Hands</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Fri 15 Aug 1997, 22:13 GMT
</LI>
</UL>
</LI>
</UL>
</LI>
<LI><strong><A NAME="00601" HREF="msg00601.html">Re: [MUD-Dev]  Spellcaster, or Waving Hands</A></strong>, 
Nathan Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Fri 15 Aug 1997, 06:56 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00551" HREF="msg00551.html">[MUD-Dev]  Quad-trees/Oct-trees</A></strong>, 
Dan Armstrong <a href="mailto:orion#pixi,com">orion#pixi,com</a>, Thu 14 Aug 1997, 11:39 GMT
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00552" HREF="msg00552.html">[MUD-Dev]  Quad-trees/Oct-trees</A></strong>, 
Dan Armstrong <a href="mailto:orion#pixi,com">orion#pixi,com</a>, Thu 14 Aug 1997, 11:39 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00537" HREF="msg00537.html">Re: [MUD-Dev]  Introduction</A></strong>, 
John G. <a href="mailto:ashen#pixi,com">ashen#pixi,com</a>, Thu 14 Aug 1997, 02:54 GMT
<UL>
<LI><strong><A NAME="00575" HREF="msg00575.html">Re: [MUD-Dev]  Introduction</A></strong>, 
clawrenc <a href="mailto:clawrenc#cup,hp.com">clawrenc#cup,hp.com</a>, Thu 14 Aug 1997, 21:35 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00550" HREF="msg00550.html">[MUD-Dev]  Introduction</A></strong>, 
Dan Armstrong <a href="mailto:orion#pixi,com">orion#pixi,com</a>, Thu 14 Aug 1997, 11:26 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>