MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Quad-trees/Oct-trees
Dan Armstrong wrote:
> 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.
Sounds like a quad tree, based on what little understanding I have of
these "formal" definitions. :)
You could probably modify this to work in three dimensions, by turning
it into an oct-tree (each level holds eight smaller pieces of the tree).
There's just one problem. What do you do if some enterprising (read:
mischevious) player drops one object in each four (or eight) room
cluster? That'd cause your tree to create over 2^38 entries in the tree
to deal with them. Of course, there probably aren't that many objects
around, but even on a smaller scale, this looks like it could become
expensive.
--
Michael Hohensee michael#sparta,mainstream.net
http://www.geocities.com/SiliconValley/Heights/9025/
Finger me for my PGP Public Key, or use:
http://sparta.mainstream.net/michael/pgpkey.txt
- Thread context:
- Mud Languages (Introesque),
##Make Nylander thenewt#use,usit.net, Fri 08 Aug 1997, 12:43 GMT
- Introduction,
Dan Armstrong orion#pixi,com, Fri 08 Aug 1997, 02:43 GMT
- Re: [MUD-Dev] Mud Languages,
Chris Gray cg#ami-cg,GraySage.Edmonton.AB.CA, Thu 07 Aug 1997, 17:19 GMT
[ Other Periods
| Other mailing lists
| Search
]