Hex distance calculator utility?

jztemple

Member
Joined
May 11, 2005
Messages
253
Reaction score
0
Location
Florida
OK, I'm playing on these honking big ACW maps and I have guys at point A and I want to get them to point B and I wonder, how far are they apart?

Well, sure, I could count the hexes, but what fun is that? Years ago I had made a little program in my programmable calculator I had made that would do this, but that device is long gone and I don't have the mental impetous to work it all out again.

Does anyone have a link to a hex distance calculator that works on the ACW coordinate system? Can be an excel spreadsheet type or a standalone utility, or some clever Java thing ;). I did a Google search but only found some web pages with lots of math formulas that made my head hurt...
 

CyberRanger

Member
Joined
May 1, 2003
Messages
1,984
Reaction score
6
Location
NC, USA
Country
llUnited States
The formula would be something like:

Distance =ROUNDDOWN(SQRT((ABS(B2-B3))^2+(ABS(C2-C3))^2),0)

where hex 1 is (B2,C2) and hex 2 is (B3,C3)
 

jztemple

Member
Joined
May 11, 2005
Messages
253
Reaction score
0
Location
Florida
Yup, that's pretty close. It works very well on N-S and E-W pairs, but has a litle trouble with the ENE, ESE, etc directions, those along a row of hexes that don't run N-S. For instance, the pair 80,71 to 103,60 yields a calculated result of 25, but the actual hex by hex count is 23. I remember my old formula had to use a fudge factor based upon the angle between the pairs to account for the hex grid. Still, yours is good enough for most situations, so I'll leave the Excel sheet up while playing. Thanks for the help!

UPDATE: Here's a couple of sites I found that might be of interest:
Calculating the distance between two Hexes
Clark Verbrugge's Hex Grids
 
Last edited:

CyberRanger

Member
Joined
May 1, 2003
Messages
1,984
Reaction score
6
Location
NC, USA
Country
llUnited States
Thanks for the links! I enjoy reading stuff like that. Now, I feel challenged to fix my spreadsheet to always get the correct number!
 

CyberRanger

Member
Joined
May 1, 2003
Messages
1,984
Reaction score
6
Location
NC, USA
Country
llUnited States
Maybe someone more closely associated with HPS can share the function used in the games to calculate distance??!!
 

rahamy

HPS Games Forum Moderator
Joined
Jun 3, 2004
Messages
2,531
Reaction score
3
Location
Virginia, USA
Guys,

Wouldn't distance be realitive to the paths you have availible to get there? As the crow flies things are pretty close, but if you have to march around a mountain to get there...

Also, it may be shorter in hexes to go from point A to point B, but if you take a main Road, then it might be quicker to go to A, C then B due to movement point costs...
 

jztemple

Member
Joined
May 11, 2005
Messages
253
Reaction score
0
Location
Florida
rahamy said:
Guys,

Wouldn't distance be realitive to the paths you have availible to get there? As the crow flies things are pretty close, but if you have to march around a mountain to get there...

Also, it may be shorter in hexes to go from point A to point B, but if you take a main Road, then it might be quicker to go to A, C then B due to movement point costs...
Yes, this is true if calculating movement, but I'm looking at it from the point of the very large maps, where I'd just like to know the hex count from A to B. It's more of an academic exercise, but sometimes those can be fun as well. From the first of the links I have listed above, you can see that certainly it's a non-trivial calculation to get the exact distance. I had thought that after all this time someone would have come up with a clever utility to implement a complex algorithm or perhaps even solve it with a brute force method.

In a somewhat related area, I'm also remembering an old Strategy & Tactics magazine article that discussed in a sidebar the rules of thumb used by officers of the Civil War era to quickly calculate how much time would be needed to move x number of troops of a certain type (infantry, cavalry) over distance y, with adjustment for roughness of terrain and weather and ground conditions.

For some of the ACW campaign maps, there are some seriously large distances to be crossed. So I'm thinking to myself that I ought to be able to come up with some rules of thumb guides for myself. For instance, I have three infantry brigades I want to move from their current location to a certain hex far away. Now, I could count hexes and calculate movement points, but I'd rather put myself more in the boots of a civil war commander. I would say "three brigades, not on the road yet, x amount of time to get them going, then so many miles per hour, then so much time to come back off the road and go into battle formation". With fourteen hexes per mile, I can use my quick rule of thumb, along with my hex distance calculator to say how far away the destination is, then glance at the map (because to study it at great length would give me more info than would be available to a real ACW officer) and note whether there are obvious roads to get there or whether I have to "fudge factor" in some detours.

I'm reading Coddington's "The Gettysburg Campaign: A Study In Command" right now and this is what has gotten me thinking about this. Your typical commander, if asked how long to get his unit from x to y, wouldn't start pulling out detailed maps and measuring distances and "counting hexes" ;). His superior would expect him to know if he had to travel x number of miles it would take him y number of hours to break camp, get on the road, get there, and then either go into battle formation or go into camp. I'm just trying to develop a sort of knowledge base so that I can provide the same quick answer to my superior in the game (who is also me :))
 
Last edited:

CyberRanger

Member
Joined
May 1, 2003
Messages
1,984
Reaction score
6
Location
NC, USA
Country
llUnited States
In short, we want to know the exact hex distance because we know it's possible! :cheeky:
 
Top