Archived

This topic is now archived and is closed to further replies.

The_Dolphins

Diamond Tiles - Rotation?

Recommended Posts

Just venturing into tile based game programming.To get a feel for the topic, i decided to write a program which would display a simple map on the screen(blue/green denoting terrain).The map was to be a diamond map(ala TT/AOE) not a square one. I am using DX7. The map is just a collection of green and blue tiles and is 256x256 tiles across. I first setup the map by initializing the terrain with the height values(which basically map to various blue green shades). I do this by drawing coloured rectangles.So I end up with a 256x256x32(each tile is a 32*32 square) pixels wide square. Now, I am aiming for the Transport Tycoon/AOE map look, in which the map is a diamond(rhombus?) not square.To get this look, I rotate the map by 45 degrees (using the Blt fn) and then display it on the screen. Q : There has to be a better way of getting the diamond look, than rotating the whole map everytime. What am i missing? ______________________________________________ So Long, and Thanks for All the Fish !

Share this post


Link to post
Share on other sites
draw the tiles as diamonds (well, you might want to draw them, then rotate and flatten them, then make sure the edges are nice for wrapping)... then draw them that way too (there are articles and posts about the details here on gamedev.net)...

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites