08-31-2005, 05:53 AM
I'm busy coding a hexagon tile map engine, but i've encountered a problem and can't really solve it.
FOR x = 0 TO 15
FOR y = 0 TO 12
put (x * 40 - xpos, y * 40 - ypos + (x AND 1)*20), VARPTR(tiles(72 * 3204)), TRANS
NEXT
NEXT
this tile layer got properly drawn on the map but when i move the camera to the left or right, the logical calculation puts my layer 20 pixels down, i got this method from a tutorial and don't know how to handle this. Any help will be appreciated
here's the exec. of my engine
http://s10.yousendit.com/d.aspx?id=3CVJ3...MQOJ0PXXNQ
FOR x = 0 TO 15
FOR y = 0 TO 12
put (x * 40 - xpos, y * 40 - ypos + (x AND 1)*20), VARPTR(tiles(72 * 3204)), TRANS
NEXT
NEXT
this tile layer got properly drawn on the map but when i move the camera to the left or right, the logical calculation puts my layer 20 pixels down, i got this method from a tutorial and don't know how to handle this. Any help will be appreciated
here's the exec. of my engine
http://s10.yousendit.com/d.aspx?id=3CVJ3...MQOJ0PXXNQ