Saturday, November 27, 2010

Progress, sorta

I spent all day drawing in a small booklet of graph paper trying to figure out how to go about writing a "true" isometric tile engine. This looks a little better, though not by much. I am ripping into the XNA Resources updated Tile Engine which doesn't support isometric tiles yet. This is what I've come up with for determining the origin of the tile. I'm not sure why I'm getting space between my tiles.

tileDraw.X = originOffset + (halfTileWidth * (x-y))
tileDraw.Y = halfTileHeight * (x+y)


With vertical tiles I've discovered what I'm calling "L-walls" and "R-walls". The code is different depending on which way the tile is facing. To draw an L-wall, you simply find the origin as if you were drawing a floor tile and then add this Point to it:
new Point(-halfFloorTileWidth, halfFloorTileHeight - wallHeight)

To draw an "R-wall" find the origin as if you were drawing a floor tile and add:
new Point(0, 3*halfFloorTileHeight - wallHeight)

Also I highly recommend Genetica which I used to render this door. I haven't figured out the right numbers to properly skew it so I'll be doing more experimentation. But I hope to use Genetica to generate many more high-quality tiles.

No comments:

Post a Comment