Travel time bug

Discussion in 'Browser Issue Archive' started by coolmite, Oct 1, 2014.

  1. coolmite

    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?
     
  2. Zeltino

    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: [TABLE="width: 714"]

    Barracks research information
    Level Requirement Name Description
    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]7[/TD]
    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]Taining grounds[/TD]
    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]This research will increase your discipline by 33%. Discipline increases your army arrival time estimation.[/TD]

    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]19[/TD]
    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]Large grounds[/TD]
    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]This research will increase your discipline by 33%. Discipline increases your army arrival time estimation.[/TD]

    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]23[/TD]
    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]Fortified Roof[/TD]
    [TD="bgcolor: rgba(255, 226, 188, 0.2)"]Researching this will increase this building's hit points by 50%[/TD]

    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]25[/TD]
    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]Military Academy[/TD]
    [TD="bgcolor: rgba(82, 43, 0, 0.0784314)"]This research will increase your discipline by 33%. Discipline increases your army arrival time estimation.[/TD]
    [/TABLE]
     
  3. SechulLath

    SechulLath Guest

    22% error cannot be attributed to discipline.
     
  4. coolmite

    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.

    [​IMG]
     
  5. Tokano

    Tokano Paladin

    Joined:
    Oct 2, 2014
    Messages:
    868
    Likes Received:
    97
    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 [​IMG]
     
  6. coolmite

    coolmite Guest

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

    Your explanation led me to another thread where I found this:
     
  7. coolmite

    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.
     
  8. Tokano

    Tokano Paladin

    Joined:
    Oct 2, 2014
    Messages:
    868
    Likes Received:
    97
    I'm not gonna lie, I kinda cheated and went to this article.
    I gave up trying to use the Pythagorean Theorem route since it never was quite as accurate as I would have liked. Then I found this article a few days ago and it helped tweak it in a way I wouldn't have considered.

    Granted, it's based off of Civilization V, but it can be applied to TW2 since he's only considering a flat 2D plane.
     

Share This Page