Skip to content

Instantly share code, notes, and snippets.

View RaasAhsan's full-sized avatar

Raas Ahsan RaasAhsan

View GitHub Profile
@RaasAhsan
RaasAhsan / gist:4009942
Created November 4, 2012 03:08
screen and isometric space
Screen -> Isometric space equations
iX = (((ScreenX) / tileWidth) - ((ScreenY) / tileHeight));
iY = (((ScreenX) / tileWidth) + ((ScreenY) / tileHeight));
Isometric -> Screen space equations
ScreenX = (iX + iY) * tileWidth / 2;
ScreenY = (iY - iX) * tileHeight / 2;
Assuming the isometric coordinating system goes as this: http://i.imgur.com/aUM4g.png