Hex based coordinate system
Hi... I''m working on a hex based game, and I''m having trouble working out a coordinate system for doing things such as clicking selecting a hex... Because every other row is offset left or right (depending on how you look at it), you can''t seem to easily apply a x,y coordinate system. I suppose if you''ve worked on one you know what i mean.
I can create a "map file" which contains the centers for each tile, but it seems overkill to go through a whole 2d array of 2d elements and compare that to mouse coordinates to find the closest one... or not? Is there a better method?
Thanks for any advice.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement