Infinite hexagonal board with axial coordinates

When it comes to hexagonal boards, the choice of a coordinate system is primordial. From that choice derives the complexity of the underlying algorithms, like pathfinding for example.

Hexode uses a system of axial coordinates. Each hexagon has its position defined by two integers (U,V). This naming convention may be a bit misleading as those are the same letters used for describing texture coordinates. But I think the code itself is not ambiguous as I have defined a custom Unreal structure “HexCoordinate”, which is really handy when it comes to using it with Blueprints.

hexagonal_coordinates
(more…)