[MUD-Dev] Breaking down the walls

Hans-Henrik Staerfeldt hhs at cbs.dtu.dk
Fri Jun 14 13:10:47 New Zealand Standard Time 2002

On Thu, 13 Jun 2002, David B. Held wrote:
> From: "Brian Lindahl" <lindahlb at hotmail.com>

> So my speed hack was: don't use unrestricted polygons.  Instead, I
> use rectangles.  "Rectangles???" you say?  Yup.  Only instead of
> just rectangles, they are really paired triangles forming a
> rectangle.  Each corner of the rectangle has its own elevation,
> and you specify which orientation the two triangles have.  This
> has the effect that you can cover any polygonal shape, but it
> might require more than one tile.  To form a diamond, for
> instance, requires four tiles.  The upshot is that you now have a
> rectilinear graph which vastly simplifies all kinds of space
> calculations, and provides a relatively fast way to do coordinate
> searching and other stuff.  The constraints allow you to make
> various optimizing assumptions (like where to expect connecting
> tiles, etc.).  The system isn't complete, or perfect, but it's
> certainly interesting, and I will need more time with it to decide
> whether it works the way I want it to.

I implemented circles-only. The question is wether the _exact_ shape
makes much difference in a textually rendered environment. If i
wanted to make computational shortcuts and implement general
polygons i would circumscribe them with a circle and then only test
the polygon if the circle contained the point.

(code available on request)

Hans Henrik Stærfeldt   |    bombman at diku.dk    | work:  hhs at cbs.dtu.dk      |
Address:                |___  +45 40383492    __|__       +45 45252471     __|
DTU, Kemitorvet,        | Scientific programmer at Center for Biological     |
bygn 208, CBS.          |  Sequence Analysis, Technical University of Denmark|

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list