the answer to either one is "yes", but i dont want to go into an explanation of both in a single post.
Isometric Calculations
Get off my lawn!
------------------
Dino M. Gambone
http://www.xyphus.com/users/dino
Good judgement is gained through experience. Experience, however, is gained through bad judgement.
Dino M. Gambone
Good judgment is gained through experience. Experience, however, is gained through bad judgment.
Currently working on Rise of Praxis MUD: http://www.riseofpraxis.net/
And then, why should anything look wrong? The graphics aren't re-calculated, only coordinates.
So it looks like: (though I might have some of the matrices off a little)
| x-scale 0 | * |cos n -sin n | * | x | + | x-trans |
| 0 y-scale | |sin n cos n | * | y | | y-trans |
If this doesn't look right copy and paste into a fixed width text editor.
with x,y coordinates from the left bottom corner in the 2d map (By the way i'm not sure if ISO was 30º... just change it for the actual degrees)
y' = x*sin30 + y*sin30
x' = x*cos30 - y*cos30
// the 2 means 2:1 - use 3 for 3:1
isox = mapx - mapy;
isoy = (mapx / 2) + (mapy / 2);
So, if we want to map something at map coordinate 128, 128, then the iso coordinates would come out to:
isox = 128 - 128; // 0
isoy = (128/2) + (128/2); // 64+64 = 128
Or map coordinates 128, 0:
isox = 128 - 0; // 128
isoy = (128/2) + (0/2); // 64+0 = 64
Note that the iso coordinates are in screen plotting coordinates. So when rendering from map coordinates to the iso coordinates on screen, the origin is the top-most point of the top-most tile, with positive x running down and right and positive y running down and left.
Jim Adams
Also, 45 degrees around y is correct, but it's also 30 degrees along x. This'll give you a 2:1 ratio.
Jim Adams