Iso Tiles
This is what a iso tile should look like isn''t it?
000011110000
001100001100
110000000011
110000000011
001100001100
000011110000
but how to put them together?
I have such a routine:
DrawX = IndexX * TILE_WIDTH + (IndexY & 1) * TILE_WIDTH / 2;
DrawY = IndexY * (TILE_HEIGHT / 2 + 1);
This is how I learned it and how you can put them next to each other without overlapping lines. But I have a problem with this, because with this way you can''t make textured tiles connect correctly because they shift in the Y direction. The middles of the tile sides don''t connect correctly. So instead of two straight diagonal lines in the map you get a stepped look.
I hope I explained it good enough, if I don''t just tell me and I''ll try again... (and I''ll add some more later, because I found a solution, but that gives me some more problems...)
Mox
you''re close. there are actually a number of ways to do an isometric tile, but the way i''ve found that looks the best is as follows:
000000XXXX000000
0000XXXXXXXX0000
00XXXXXXXXXXXX00
XXXXXXXXXXXXXXXX
00XXXXXXXXXXXX00
0000XXXXXXXX0000
000000XXXX000000
0000000000000000
you can plot them in several ways. the three most common:
worldx=tilex*TILEWIDTH
worldy=tiley*(TILEHEIGHT/2)
worldx=tilex*TILEWIDTH+(tiley & 1)*(TILEWIDTH/2)
worldy=tiley*(TILEHEIGHT/2)
worldx=(tilex-tiley)*(TILEWIDTH/2)
worldy=(tilex+tiley)*(TILEHEIGHT/2)
each gives a different effect.
000000XXXX000000
0000XXXXXXXX0000
00XXXXXXXXXXXX00
XXXXXXXXXXXXXXXX
00XXXXXXXXXXXX00
0000XXXXXXXX0000
000000XXXX000000
0000000000000000
you can plot them in several ways. the three most common:
worldx=tilex*TILEWIDTH
worldy=tiley*(TILEHEIGHT/2)
worldx=tilex*TILEWIDTH+(tiley & 1)*(TILEWIDTH/2)
worldy=tiley*(TILEHEIGHT/2)
worldx=(tilex-tiley)*(TILEWIDTH/2)
worldy=(tilex+tiley)*(TILEHEIGHT/2)
each gives a different effect.
I''ve tried a lot of diffirent tiles now and I think I finally have a good one. I use the algorith I posted before and think the tiles connect perfectly now...
0000001100000000
0000111111000000
0011111111110000
1111111111111100
1111111111111100
0011111111110000
0000111111000000
0000001100000000
This way the textures on the tiles also connect correctly
Mox
0000001100000000
0000111111000000
0011111111110000
1111111111111100
1111111111111100
0011111111110000
0000111111000000
0000001100000000
This way the textures on the tiles also connect correctly
Mox
If tiles are of the size N by N/2-1 then you can use:
Xdraw = (Xindex-Yindex)*TileWidth
Ydraw = (Xindex+Yindex)*TileWidth/2
Xdraw = (Xindex-Yindex)*TileWidth
Ydraw = (Xindex+Yindex)*TileWidth/2
That's more of a top-down tile, Mox. For an easy and realistic 3D effect, tiles should be wider than they are tall, otherwise you end up with a mock-3D look, like the original SimCity (which is now available on Palm, I see).
I might be wrong, however.
PS.
Palm SimCity - http://www.ateliersoftware.com/palm/scc.html. Surprisingly attractive.
Edited by - Mayrel on October 22, 2001 3:11:56 PM
I might be wrong, however.
PS.
Palm SimCity - http://www.ateliersoftware.com/palm/scc.html. Surprisingly attractive.
Edited by - Mayrel on October 22, 2001 3:11:56 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement