changing the co-ordinates to tilebased instead of pixel based