View Single Post
Old 06-07-2017, 10:52 PM   #5
RyanW
 
RyanW's Avatar
 
Join Date: Sep 2004
Location: Southeast NC
Default Re: [Space] Planetary maps

A thing I did once while programming a game, and can't think of a better place to put it, was numbering columns sequentially, and rows alternatively odd and even.

So column 2 would have its hexes labeled 22, 24, 26, 28, etc., column 3 would have 31, 33, 35, 37, etc., and hex 33 would be surrounded by (clockwise from the "north") 31, 42, 44, 35, 24, and 22. This makes it easy to calculate the screen position a token needs to be drawn at, and distance between two hexes is easy to calculate in a program, as (ABS(X1-X2)+ABS(Y1-Y2))/2.
__________________
RyanW
- Actually one normal sized guy in three tiny trenchcoats.
RyanW is offline   Reply With Quote