Bill wrote:
> Bill wrote:
> > Can anyone suggest a formula to find the dimensions ( width and height
)
> > of a 2D array tile map in terms of tiles from an isometric map? The
> > Isometric tiles are typical 2:1 diamonds and the width and height of
the
> > isometric maps vary because they are randomly generated. These
isometric
> > maps are not 45 degree rotated squares maps, they are rotated
> > rectangles. For example I have the isometric map on the left, but I
need
> > to create the 2D array on the right, which turns out to be 3x5.
Deja vu all over again.
Why not just generate the map as a 2D array to start off with
then just draw it isometrically? Saves a lot of bother.
Otherwise, pretend the first tile is at 0,0. As you generate new tiles
calculate their (x,y) position relative to the first tile.
Keep track of the smallest x, the smallest y, the largest x, and
the largest y. From there it's easy.
---
Geoff


|