Re: Linked Lists and Arrays

From: Zachary Tellman (
Date: 05/02/00

>Applying this to three dimensions takes a bit more work.  We'll use >an
>example to lead us into the theory.  In our example, we'll be >dealing with
>a 320x200x5 three dimensional object.  We know that, were >we to treat each
>layer (0-4) as a two dimensional rectangle, the area >of said rectangle
>would be 320x200 (or 64000).  So, to have it all be >linear, we need to
>         0 - 63999     for layer 1's (x, y) coordinate space
>     64000 - 127999    for layer 2's (x, y) coordinate space
>    128000 - 255999    for layer 3's (x, y) coordinate space
>and so on up until we get to layer 5's coordinate space.  So let's >say we
>have the coordinate pair (2, 3) in our above mentioned three >dimensional

Couldn't you also define multiple 2-d arrays, one for each elevation. Your
method requires that we have a predefined limit for each level, which is
what I'm trying to avoid.  This way, the constraints on the mud are
nonexistent, and that makes things much easier.  However, passing a player
from array to array could make things somewhat more complicated.  Not having
implemented something like this before, I have no way of knowing.  Any input
would be appreciated.  Also, is it be possible to create an array of arrays?

Get Your Private, Free E-mail from MSN Hotmail at

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  |

This archive was generated by hypermail 2b30 : 04/10/01 PDT