[MUD-Dev] Introduction

clawrenc at cup.hp.com clawrenc at cup.hp.com
Thu Aug 14 14:52:48 CEST 1997


In <199708141126.BAA20971 at mail.pixi.com>, on 08/14/97 
   at 04:28 AM, "Dan Armstrong" <orion at pixi.com> said:

>On Wednesday, August 13, 1997, clawrenc at cup.hp.com wrote: > 
>> In <199708080243.QAA24348 at mail.pixi.com>, on 08/07/97 
>>    at 09:38 PM, "Dan Armstrong" <orion at pixi.com> said:

>> >For storing objects I use a tree that is twenty levels high, based on
>> >the following pattern.  Each level in the tree, except for the last,
>> >holds four smaller pieces of the tree.  If any of those four are
>> >null, then there aren't any objects in the area covered by that
>> >piece.  The last level in the tree is either null if nothing is
>> >there, or points to the head object of a linked list of every item
>> >that is at that location.
>> 
>> What do you do when Bubba dumps 50,000 individual pieces of gold,
>> pebbles etc all at the same location?  Have a lost 50,000 items long?

>Gold already clumps together.  It would be stored as one object of
>gold containing 50,000 pieces.  

Okay, lets pick some gold, some stones, some feathers, some leaves,
some grass clippings, some earrings, some nose rings, a couple
boogers, a small pile of nail clippings, some dust, a little water,
some hair, etc.  ie Assemble a numerically very large collection of
objects which attempt to defeat your system's glomming features.

The idea is to assemble a worst-case senario which maximally stresses
your model in a given direction.  

>...In the event that
>Bubba does manage to find enough objects to get 50,000 objects in one
>place, then I will have a linked list of 50,000 items to go through.

Ouch.  

In which case, what efficiency do you gain by limiting the depth of
your tree to 20 nodes?  Why not continue division until each leaf is
guaranteed to contain <N objects?

>I'm trying to decide on a way to reduce the area of searching for
>objects that Bubba might be able to see.  I was thinking of the sight
>distance as being a horizon for the look processing.

Related to which I'd love to sit down and see what sorts of algorithms
AlphaWorld are using for just this case.

>If the absolute coordinate of a single object is desired, it can be
>determined by looking back up from smallest to largest containing
>squares.  Rather easy because each step up determines one bit of the
>x and y coordinates, to end up with the full 20 bit coordinate.

Another address to the too-many-objects-at-a-location problem is to
make the list of objects at a location instead a table of hashed
buckets.

--
J C Lawrence                           Internet: claw at null.net
(Contractor)                           Internet: coder at ibm.net
---------------(*)               Internet: clawrenc at cup.hp.com
...Honorary Member Clan McFUD -- Teamer's Avenging Monolith...




More information about the mud-dev-archive mailing list