Monday, June 22, 2015

javascript - HTML5 canvas screen to isometric coordinate conversion


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.




No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...