I tried to create an Isometric map editor and I stumbled across this problem when I generated the map :
http://postimg.org/image/atsqgu5on/
My generated map looks like the (A) scheme having some tiles offscreen . What must I change in my code to get a (B)-ish map?
This is the code I used to create the cells in my map. (32 is the tile height and width)
for (int i = 0; i <this.Height; i++)
{
Map[i] = new Rectangle[Width];
miniMap[i] = new Rectangle[Width];
for (int j = 0; j < this.Width; j++)
{
int x = 32 * j;
int y = 32 * i;
int isoX = x - y;
int isoY = (x + y) / 2;
Map[i][j] = new Rectangle(isoX,isoY, 64, 64);
}
Somehow I know that the problem lies here : int isoX = x - y; but I don't know what to change in order to get my desired result. Thank you for any help.