HTML5 canvas screen to isometric coordinate conversion
Posted
by
ovhqe
on Game Development
See other posts from Game Development
or by ovhqe
Published on 2011-07-29T16:53:04Z
Indexed on
2011/11/27
18:06 UTC
Read the original article
Hit count: 551
I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates. My code now is:
var mouseX = 0;
var mouseY = 0;
function mouseCheck(event) {
mouseX = event.pageX;
mouseY = event.pageY;
}
which gives me canvas coordinates. But how do I convert these coordinates to isometric coordinates? I am using 16x16 tiles.
© Game Development or respective owner