One of the challenges of writing programs for Hex maps is coming up with a coordinate system.   

Pocket Avid uses two related coordinate systems: The ABC system and the AF system.  The ABC system is used internally for calculations as it is computer friendly.  The AF system is used for human interaction as it is more intuitive to write the coordinates in AF notation.

 

The above maps shows the AF system in action.

The hexagon in Green is the "Origin" Hex.  It is 0,0.  Everything else is measured from there.  The six directions are labeled A through F (hence the name) and every single hex can be described as a distance in 1-2 directions.

This system should be intuitive for humans to use as it is easy to count out hexagon from the Origin.  When used in actual game play, the only real issue has been measuring the distance from a hexagon to the Origin instead of the Origin to the hexagon.  For example, measuring the Yellow hexagon as 6B, 3C instead of 6E, 3F.

The primary problem with the AF system is that it does not lend itself well to mathematics.   So while, it is easy to describe the relationship between a hexagon and the Origin, it is not easy to describe the relationships between hexagons.  For that, we use the ABC system described in a future blog post.

To use this at the gaming table, I simply place a marker (usually a poker chip) in a hexagon in the middle of the map and call it the Origin.  Everything is then measured from there.