Behaviour - HeroesReplay/HeroesReplay GitHub Wiki

This page covers the expected behaviour for the spectator.

Calculators

There are several calculators in the engine which are used to determine various things such as near camps, proximity to enemy heroes, heroes that kill or die etc. These calculators are loaded and and used to analyze the outcome of a replay file. Once the calculators have processed and returned who they think should be focused for each second, a second overall process occurs in which it ensures kills and deaths take priority and overwrite other calculators suggested focused heroes for those seconds.

Should not constantly switch focus hero.

It seems a bit jarring when the spectator was continuously swapping between different heroes, not really feeling like a spectator at all. In situations like deaths or kills, there is a build up focus period of time so that there is context given to the viewers and they can see what will happen before its too late.

Should not focus heroes in base.

This should be managed by calculating the distance from the ally core, if they're 'close' to the core, then prioritise focusing other heroes on the field, maybe heroes who are in close proximity to other enemy heroes.

Focusing on heroes near a ping or who pinged

This was removed because only pings from 1 team are in a replay file. The replay only contains the messages and pings from the player team of where the replay originated from. (Team blue or Team red).

Abathur kills will focus on the enemy player who died.

It's a bit strange if the spectator selects Abathur if he kills someone in mines in the battlefield, there is spectator logic that checks the distance between the killer hero and died hero and if its greater than a pre-defined distance, it should focus on the hero who dies. This is also the same for ranged heroes such as a Hanzo dragon or Fexix ultimate ability which can be across the map.

Deathwing Focus

This has not been fully thought out yet (when he is in the sky). There is no unique way to know when he is in the sky, unless we check the last time deathwing pressed Z, but that does not guarantee he is in the sky, maybe there can be some work done on his location and if his location does not move for a period of time, we skip focusing him?