All times are UTC


It is currently Mon Aug 26, 2019 5:59 am



Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Mechanics of army movement & speed
PostPosted: Tue May 20, 2014 3:09 pm 
Veteran Forum Gyrocopter
User avatar
Offline

Joined: Fri Dec 14, 2012 9:55 am
Posts: 2211
Today I will show you how exactly the army travel time is calculated. (...and also list some general effects for those not that much interested in exact numbers and formulas.)

  • All game units have the same basic move speed.
  • The only things able to accelerate the speed are artifacts, potion and hero skill. (Don't forget that all of them need to be active BEFORE sending, it has no point to activate them when already on the way.)
  • The bigger the distance to the target, the greater effect your speed bonuses will have.
  • After sending, you can retreat your army ONLY UNTIL a half of travel time to the target expires.


travel time = base default time + (distance x default time per square / army speed )

base default time = always 10 seconds (constant)
- that means your army always travel at least 10 seconds or more
default time per square = 40 seconds (constant)

So it means, that there are just 2 variables: army speed and distance. Let's have a closer look at them.

1) army speed

army speed = 20 by default, plus % bonuses from (hero skill + speed potion + artifacts).


2) distance

Now it gets a little ugly. (Just a little)
Normally, you count a distance (anywhere, not just Emporea) like this:

starting coordinates [x1, y1]
target coordinates [x2, y2]

distance = √(|x2-x1|^2+|y2-y1|^2)*

But worlds of Emporea are cyclic, they have no beginning or end, no "borders". In the world of 500 x 500 tiles the places [0,0] and [499,499] are actually next to each other. (Instead of being the most distant points). Armies always choose the shortest path possible between any two points. So the distance formula for Emporea is:

distance = √((min (|x2-x1|, 500 -|x2-x1|))^2+ (min (|y2-y1|, 500 -|y2-y1|))^2)


-----

Example:

10th level of "Patchfinding" hero skill = + 40 %
1st level of speed potion = + 20 %
4th level of "Bow of swiftness" artifact = + 20 %
starting coordinates [17,490]
target coordintes [262, 220]


army speed = 20 + (40 % + 20 % + 20 %)
army speed = 36

distance = √((min (|262 - 17|, 500 -|262 - 17|))^2+ (min (|220 - 490|, 500 -|220 - 490|))^2)
distance = √((min (245, 255))^2+ (min (270, 230))^2)
distance = √(245^2+ 230^2)
distance = √(60025 + 52900)
distance = √ 112925
distance = 336

Now, with our 2 variables ready, let's go back to the main formula:

travel time = base default time + ((distance^ travel coefficient) x default time per square / army speed)
travel time = 10 + (336 x 40 / 36)
travel time = 10 + (336 x 1,11)
travel time = 10 + 373
travel time = 383 seconds = 6 minutes and 23 seconds

(Without any speed bonuses, just with default army speed 20, the travel time would be 682 seconds, so about 11 minutes)

Now someone should simulate it in the game, to check if I haven't made some mistake in my calculations...
:lol:

Ask, if you have some comments or questions to this topic! :)

-----
*Note: a^b = a to the power of b

_________________
True warriors fight their battles on EMPOREA.ORG
Image
http://emporea.org
Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron