Gathering rate is not balanced!

User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4513
Joined: Mar 31, 2015
ESO: EAGLEMUT
Clan: WPact

Re: Gathering rate is not balanced!

Post by EAGLEMUT »

VooDoo_BoSs wrote:
Dolan wrote:Here's another possible explanation: it doesn't matter when the animation gets finished or if it reaches a certain sequence. Once you task the villager on a resource, he goes into "wood gathering mode activated" and a timer is assigned to this continuous activity. As long as the timer runs, a trickle of that resource keeps coming, until the gathering activity gets interrupted (by re-tasking or walking). Animations may or may not synchronise perfectly with the incoming trickle of that gathered resource.

Very rarely, if one vill gathers on a tree, that trickle of incoming wood seems to jump by 2 :wood:. And more often, the trickle freezes for more than 1 second. So while you keep one villager gathering on a tree, the trickle of incoming wood seems to sometimes slow down for 1 second and sometimes accelerate for 1 second. I wonder if there's a periodicity to this and if, on a long enough period of time, it evens out.

PS. It would be even weirder if this plays out differently on different machines, because the game engine commands might execute at different times, depending on a number of internal schedulers that keep track of every action on the map. So the game engine might handle these differently depending on how many computing resources it's being alloted by the system.


Imagine if having a smoother PC increases your gather speed.

But, it does... in singleplayer. I agree with Garja this is most likely what's being observed here.
User avatar
India Frost Bite
Dragoon
Posts: 300
Joined: Dec 4, 2016
ESO: ContainsCaffeine
Location: India
GameRanger ID: 3243371

Re: Gathering rate is not balanced!

Post by Frost Bite »

That explains why i lost many games.
World War 3 is inevitable, Run for your lives, fools
No Flag helln00
Howdah
Posts: 1410
Joined: Jan 28, 2017
ESO: helln00

Re: Gathering rate is not balanced!

Post by helln00 »

Wouldnt a way to test this be to use asian vils and Rice paddies?

asian vils have the extra function of generating export when they are gathering so if this inconsistency is due to the animation randomness and and vils not collecting in those animations, then asian vils gathering on western civ mils and plantation should have a consistently lower gather rate for food/gold and export when compared to gathering on rice paddies, which don't have walking animations.

Likewise, a settler gathering on rice paddies should have higher resource gather rate when compared to gathering on mills and plantations
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

Interesting enough the gathering of resources is bound to the animation loop rather than the update loop.

For those who are interested how the gather resource update is calculated:
Animation Length * Target Unit Work Rate (Farm, Berries, ect...) * Global Work Rate * Handicap
User avatar
Italy Garja
Retired Contributor
Donator 02
Posts: 9729
Joined: Feb 11, 2015
ESO: Garja

Re: Gathering rate is not balanced!

Post by Garja »

You can sync animation in natural resources but in any case the rate is not dependant on the animation.
On mills/plants however vills have to walk in between gathering points and that is probably subiect to some randomness and even lag (as treaty players know).

In any case, any test has to be performed in the multiplayer environment to be reliable.
Image Image Image
User avatar
Turkey Mameluke
Dragoon
Posts: 471
Joined: Dec 29, 2016
ESO: Mameluké
Location: Gym

Re: Gathering rate is not balanced!

Post by Mameluke »

I've also tested it out and I had normal gathering rates.
If you see any mistakes in my grammar/vocabulary or whatever, please correct me. I really appreciate it :!: :flowers:
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

I just tested it regarding the farm: https://pastebin.com/zhgdw5HL
When a vill is gathering on the farm and walks around it has the GotoState and then no food is actively gathered. Also, if the animation doesn't get complete before the switch to the goto state, then the resources are lost too. So that would probably explain the jitter here.

In the log "Animation Loop Update with gather state! --> Gather value update" represents a resource value update for the player.
User avatar
Great Britain Riotcoke
Retired Contributor
ECL Reigning ChampsDonator 01
Posts: 4088
Joined: May 7, 2019
ESO: Riotcoke
Location: Dorsetshire
Clan: UwU

Re: Gathering rate is not balanced!

Post by Riotcoke »

So this video is based on Age of Empires 2, but i still think it's interesting and useful for this thread.
https://youtu.be/u7rdLIw3_hU

In short the video explains walking distance and the efficiency of farming in age 2.
Image

twitch.tv/stangoesdeepTV
United States of America Dolphincup
Musketeer
Posts: 96
Joined: Mar 26, 2019
ESO: Dolphincup

Re: Gathering rate is not balanced!

Post by Dolphincup »

seems like this couldn't possibly be caused by animation-length inconsistencies as dawn_ has seen dramatic increases in work-rate where animation inconsistencies could only cause you to collect more slowly. and these cycles should definitely average out considering the lengths of his measurements.
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: Gathering rate is not balanced!

Post by Dolan »

Kevsoft wrote:I just tested it regarding the farm: https://pastebin.com/zhgdw5HL
When a vill is gathering on the farm and walks around it has the GotoState and then no food is actively gathered. Also, if the animation doesn't get complete before the switch to the goto state, then the resources are lost too. So that would probably explain the jitter here.

In the log "Animation Loop Update with gather state! --> Gather value update" represents a resource value update for the player.

How are you outputting these logs? Do you have a version of the game with the Developer Mode enabled? :hmm:

Have you tried testing with map resources like mines and trees?
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

Dolphincup wrote:seems like this couldn't possibly be caused by animation-length inconsistencies as dawn_ has seen dramatic increases in work-rate where animation inconsistencies could only cause you to collect more slowly. and these cycles should definitely average out considering the lengths of his measurements.


However, it is. Here is another log with the actual resource changes:
https://pastebin.com/HCRpe2pG

The relevant lines:

Code: Select all

[28.06.2019 20:33:02.839907700 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 0.0000 to 5.3600)
[28.06.2019 20:33:06.600009500 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 5.3600 to 10.7200)
<moving>
[28.06.2019 20:33:14.176163800 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 10.7200 to 16.0800)
[28.06.2019 20:33:17.526846500 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 16.0800 to 21.4400)
[28.06.2019 20:33:21.247440000 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 21.4400 to 26.8000)


Dolan wrote:How are you outputting these logs? Do you have a version of the game with the Developer Mode enabled?

UHC has a lot of possibilities. For the dev version I added a logging system.

Dolan wrote:Have you tried testing with map resources like mines and trees?

For trees and mines it is more consistent, as it doesn't break the gather animation.
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: Gathering rate is not balanced!

Post by Dolan »

@Kevsoft So what are we seeing in that log? One villager gathering which resource? Is the villager updating the gathered resource from 0 to 5.3 at second 2? Is resource quantity actually counted by the game engine using floats? Then converted to integers to display in the UI?
User avatar
United States of America 007Salt
Dragoon
Posts: 366
Joined: Jun 25, 2019

Re: Gathering rate is not balanced!

Post by 007Salt »

Maybe this is to reflect that some individuals are more efficient workers than others?
User avatar
Poland pecelot
Retired Contributor
Donator 03
Posts: 10459
Joined: Mar 25, 2015
ESO: Pezet

Re: Gathering rate is not balanced!

Post by pecelot »

false, women gather just as fast as men, they can do anything men could, and have all the right in the world to not be spared in a village raid
User avatar
Australia VooDoo_BoSs
Dragoon
Posts: 254
Joined: Jul 7, 2016
ESO: VooDoo_BoSs
Location: Australia

Re: Gathering rate is not balanced!

Post by VooDoo_BoSs »

So what is the consensus we've landed on, and does it apply to Multiplayer?
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

Dolan wrote:@Kevsoft So what are we seeing in that log? One villager gathering which resource? Is the villager updating the gathered resource from 0 to 5.3 at second 2? Is resource quantity actually counted by the game engine using floats? Then converted to integers to display in the UI?


Basically, resources are always counted in floats. The test was done with one settler wagon collecting on one farm and capturing the current state on each frame update.

So what we can see effectively is this:

Code: Select all

[28.06.2019 20:33:06.600009500 +02:00] [thread 700] [trace] Animation Loop Update with gather state! --> Gather value update (from 5.3600 to 10.7200)
<begin of a new anim cycle>
[28.06.2019 20:33:09.619077200 +02:00] [thread 700] [trace] Current state: StateGather
[28.06.2019 20:33:09.623285600 +02:00] [thread 700] [trace] Current state: StateGoto

So we basically lost 3 seconds of resource income even though the settler wagon was actively collecting.

Fun fact: In AOEO they changed from animation-based update to actual frame-based update for the gather value update making it much more smoother.
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: Gathering rate is not balanced!

Post by Dolan »

@Kevsoft
Well I was interested in why there are inconsistencies in gathering rates even for villagers gathering basic resources, like mines, trees, hunts. We already knew that there were inconsistencies on farms and plantations.

Could you do a test on a mine or a tree with a normal Euro settler too?
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

@Dolan sure, one euro settler on wood:

Code: Select all

[29.06.2019 08:10:15.636104000 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 302.6667 to 303.3333)
[29.06.2019 08:10:16.710467000 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 303.3333 to 304.0000)
[29.06.2019 08:10:17.831061800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 304.0000 to 304.6666)
[29.06.2019 08:10:18.899874500 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 304.6666 to 305.3333)
[29.06.2019 08:10:19.969625600 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 305.3333 to 305.9999)
[29.06.2019 08:10:21.027741700 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 305.9999 to 306.6666)
[29.06.2019 08:10:22.061551800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 306.6666 to 307.3333)
[29.06.2019 08:10:23.121171800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 307.3333 to 307.9999)
[29.06.2019 08:10:24.173518300 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 307.9999 to 308.6666)
[29.06.2019 08:10:25.329017600 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 308.6666 to 309.3332)
[29.06.2019 08:10:26.328297200 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 309.3332 to 309.9999)
[29.06.2019 08:10:27.470867600 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 309.9999 to 310.6665)
[29.06.2019 08:10:28.573384500 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 310.6665 to 311.3332)
[29.06.2019 08:10:29.704280300 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 311.3332 to 311.9998)
[29.06.2019 08:10:30.826408700 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 311.9998 to 312.6665)
[29.06.2019 08:10:31.905115900 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 312.6665 to 313.3332)


One euro settler on gold:

Code: Select all

[29.06.2019 08:13:38.972370200 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 100.0000 to 100.9600)
[29.06.2019 08:13:40.446291700 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 100.9600 to 101.9200)
[29.06.2019 08:13:41.944491600 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 101.9200 to 102.8800)
[29.06.2019 08:13:43.466651600 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 102.8800 to 103.8400)
[29.06.2019 08:13:45.004388000 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 103.8400 to 104.8000)
[29.06.2019 08:13:45.009024300 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 104.8000 to 105.7600)
[29.06.2019 08:13:46.540900000 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 105.7600 to 106.7200)
[29.06.2019 08:13:48.043480900 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 106.7200 to 107.6800)
[29.06.2019 08:13:49.561596700 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 107.6800 to 108.6400)
[29.06.2019 08:13:51.075318800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 108.6400 to 109.6000)
[29.06.2019 08:13:51.079219800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 109.6000 to 110.5600)
[29.06.2019 08:13:52.612615300 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 110.5600 to 111.5200)
[29.06.2019 08:13:54.121024800 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 111.5200 to 112.4800)


I've omitted the state update values as they are not relevant here.
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: Gathering rate is not balanced!

Post by Dolan »

@Kevsoft Thanks. What's going on here? The official gathering rate for Euro settlers on wood should be 0.5/sec, but here it's adding 0.666 / sec. Well the animation seems to take 1.12sec, but that doesn't fully explain the difference.

It should be at least 0.666 :wood: /1.2sec to come closer to the expected 0.5/sec rate.
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

dunno if the rates are different between EP and RE, but the test was done on RE. I've played as the ottos if that makes any difference.

What I kinda find weird however is this:

Code: Select all

[29.06.2019 08:13:45.004388000 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 103.8400 to 104.8000)
[29.06.2019 08:13:45.009024300 +02:00] [thread 6060] [trace] Animation Loop Update with gather state! --> Gather value update (from 104.8000 to 105.7600)

As it seems there is sometimes the case that the animation is repeated twice for a split second.
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

Okay, so the whole gathering mechanic in this engine is just a mess. I've spend now some time in looking deeper into this issue because those spikes are interesting indeed.

To qoute:
Dolan wrote:Very rarely, if one vill gathers on a tree, that trickle of incoming wood seems to jump by 2 :wood:

So yea, that's an engine bug.

So what happens here?
Well, when the animation manager detects that a full animation cycle has been done it will try to calculate the start point on the next animation cycle to keep the animation itself smooth. However, due to a rounding error it can happen that it calculates an animation start point right before the end of the animation. This leads to a bug where on the next frame update it would detect a full animation cycle again.

Now that wouldn't be too bad, given that you would barely notice that small "lag" visually, but given that the gather action resource gain is bound to the animation loop it leads to this bug that you get the resources awarded twice.
User avatar
Nauru Dolan
Ninja
Posts: 13064
Joined: Sep 17, 2015

Re: Gathering rate is not balanced!

Post by Dolan »

@Kevsoft
Hmm. At first I thought it must be because what you see in the UI is integers converted/rounded up from underlying float computations. So sometimes the integer "freezes" for another second until it gets another +0.5wood to make it add 1 integer. I thought it was just a rounding error.

But if your theory about this being an animation chaining/looping bug is correct, it's even more embarassing for the now-defunct Ensemble and Microsoft. Just you wait until competitive players learn of this game engine irregularity, they're gonna use it as an obscure reason for why they lose. "It was RNG" they will say.

Could this be a bug that has a certain periodicity, like every 5 animations? I haven't noticed any regularity in how often it happens. It might also need testing in multiplayer, where resource tracking and updating needs to synch between players. Multiplayer is known for sometimes "correcting" animations to force synchronisation. For example, sometimes treasure guardians are quickly re-positioned when you scout a treasure that was in the fog of war until then. Or maybe the position of guards as seen in the fog was cached in a certain position and when you scout that treasure, that cache is updated with a new position for each guardian.

There might be some similar synchronisation locks in PvP that make resource tracking and updating more consistent.
User avatar
Italy Garja
Retired Contributor
Donator 02
Posts: 9729
Joined: Feb 11, 2015
ESO: Garja

Re: Gathering rate is not balanced!

Post by Garja »

what if all resources were supposed to gather with the same rate :chinese:
Image Image Image
User avatar
Austria Kevsoft
Retired Contributor
Posts: 28
Joined: Feb 3, 2018

Re: Gathering rate is not balanced!

Post by Kevsoft »

@Dolan

I'm kinda shocked right now, because I haven't tested it for a longer duration. But now having one vill collecting at one mine for like 5 min, that is the result here:
https://pastebin.com/ESqxjUKy

Every time the pos is at 1.59** there will be a duplicate call directly behind it.

Currently tested on RE with Portuguese.

I'll hope that I can get it tested on a MP game.
User avatar
Italy Garja
Retired Contributor
Donator 02
Posts: 9729
Joined: Feb 11, 2015
ESO: Garja

Re: Gathering rate is not balanced!

Post by Garja »

only MP is relevant tho
Image Image Image

Who is online

Users browsing this forum: No registered users and 13 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV