[RPG] How to handle the math of hex maps

battle-mapmap-making

I'm having trouble calculating distances on hex-mapped worlds. The math, even at the regional scale, is difficult.

But I'm also interested in distances at the world-scale. I'm targeting icosahedral maps of planets / worlds in particular.
I'm looking for distance calculations "as the crow flies" regardless of obstacles, as opposed to the length of the most direct valid path.

How do such programs as "Traveller Heaven & Earth" calculate the various distances between hexes, particularly at the planet-scale (with those odd pentagons getting into the path)?
Perhaps there is some material on this topic in classical tabletop/boardgame stuff, but I never played such games and thus have no access to such material yet.

Any hints on this?

Best Answer

Amit Patel has a nice blog that has a section regarding hex maps. I especially like the Isometric cube coordinate system.

Regarding icosahedrons, consider each facet to be a triangular hex map where edge hexes(FJM, NLI and BCD) are shared between two facets and corner hexes (A, E and O) are actually pentagons common to all five facets at the vertex.

    O
   M N
  J K L
 F G H I
A B C D E

The regular approaches to hexagonal distance calculations work well with this kind of map. At the vertex pentagons, continuing towards any two hex(pent?) edges opposing the edge entered is equivalent.


Here is the dual of a geodesic sphere

dual of geodesic sphere


Also, please take a look at this icosahedral world map generator. Hope it helps