# Travel time bug

#### coolmite

##### Guest
It appears that the travel times are possibly being calculated incorrectly. We can use my one of my cites as an example. I have a city at 513:509. The closest barb to me is at 512:508. Using the distance formula SQRT(((Y1-Y2)^2) + (X1-X2)^2)... you get SQRT((509-508)^2 + (513-512)^2) = 1.4142. So, my troops need to travel 1.4142 tiles. A spearman travels at 14:00 minutes per tile or 840 seconds per tile. It should take a spearman 1.4142 * 840 = 1188 seconds to travel between the two villages. When I attack the said village with a spearman, it takes 1454 seconds. That is a difference of 266 seconds on a village a few tiles away. I can't even find a rounding error. Can someone please help me figure out what I'm doing wrong?

#### Zeltino

##### Guest
Hey Coolmite,

The only thing I can suggest is to check the Wiki in regards to travel speeds - http://wiki.en.tribalwars2.com/index.php?title=Battles#Speed_and_Discipline

There is a travel time estimation as well - so my best guess is a randomized variable within the equation may be changing the times up slightly as well.
Check here: http://wiki.en.tribalwars2.com/index.php?title=Barracks

Specifically:
 7 Taining grounds This research will increase your discipline by 33%. Discipline increases your army arrival time estimation. 19 Large grounds This research will increase your discipline by 33%. Discipline increases your army arrival time estimation. 23 Fortified Roof Researching this will increase this building's hit points by 50% 25 Military Academy This research will increase your discipline by 33%. Discipline increases your army arrival time estimation.
Barracks research information Level Requirement Name Description

#### SechulLath

##### Guest
22% error cannot be attributed to discipline.

#### coolmite

##### Guest
I know it has been a while, but this problem is still causing me issues. I have a spreadsheet that I would like to use to determine travel times between villages that are not my own. If you look at the following screenshot, it is obvious they are not using a standard distance formula to determine walking time. The two barbs that are below village -001- are actually equidistant based on coordinates. However, they are drawn differently and their travel times are different. Neither travel time is correct based on the distance between two points. That would be 11:18. #### Tokano

You're running into the same problem I had to adjust to when I first started playing the game as well.

Because it is a hexagon grid, when traveling to 430|278 from 431|277 they are going the distance and a half. Which is why you're running into weird travel times. It's because the game is calculating the hexgrid Z value as well as X and Y. (Kinda)
So to calculate distance it's going to be #### coolmite

##### Guest
Thanks Tokano! Where do you get the value of z?

The tiles in TW2 are hexagons and a hexagon always has a diameter to width ratio of 1.155. So the diameter of a hexagon is always 1.155 x its width.

So since the width of TW2 hexagon tile is 1, proven by looking at the travelling speeds between adjacent tiles which are connected face to face (the width),
then the diameter must be 1.155 x 1 = 1.155.

The radius then, which would be the centre of the tile to the point edge, would be 0.5775. This is the same dimension as the face length.

The vertical arrangement of tiles is such that the centre to centre distance of tiles in a line vertically is three times the radius or approximately 1.73 tiles.

You can see that this ratio is correct by taking any unit and dividing the vertical time to nearest tile by the travel time per tile and you get 1.73... as the multiplier.

So using your spears example, 14 minutes per tile x 1.73 = 24.22 minutes.

#### coolmite

##### Guest
OK, this thread can be closed. I understand now that it is not a bug. If anybody is interested in the excel formula for the distance between two villas, it is:

SQRT((IF(ISEVEN(D2),C2-0.5,C2)-IF(ISEVEN(B2),A2-0.5,A2))^2 + 0.75 * (B2-D2)^2)

This assumes x1, y1, x2, y2 are in cells a2,b2,c2,d2.