Both writing to perf.log frequently as well as GetTimestamp
aren't free and hurt performance particularly on slower systems
(which can have notably higher output to perf.log, further
amplifying the problem).
Therefore we make simulation perf logging opt-in.
Additionally, logging of the current tick and tick type
(local/net) is removed from debug.log, and some
remnant debug logging for kills and pips is removed
to keep performance-sensitive logging limited to
perf.log.
While they may be only 'visual' in terms of influence/cell grid,
they all do update CenterPosition, which is essentially the
actual world position of the actor.
'Visual' would imply that it only affects the position where the
actor is drawn, which is inaccurate.
Furthermore, using the term 'Visual' here would make
naming future methods/properties related to visual interpolation
unnecessarily complicated, because that's where we might
need a real 'Visual(Only)Position'.
Shroud, access ProjectedCellLayer by array index over PPos index.
Performance improvement. Avoid the multiple PPos to array index
conversions in the same method call by calculating the cell
layer index once.
Background:
`Shroud.Tick` and `ProjectedCellLayer.Index(PPos puv)` shows up
in profile reports as one of the most expensive methods
(9% of CPU time).
In `Shroud.Tick` calls `ProjectedCellLayer.Index(PPos puv)` multiple
times for the same or different cell layers of the same dimension.
Improvement:
Benchmark results show an 0.5ms mean improvement in tick
time and 0.3 improvement in render time -
on a replay map of 1.12 min of play at max speed.
Render time:
render222052(bleed) render221934(this commit)
count 8144.000000 8144.000000
mean 11.410075 11.470100
std 5.004876 4.731463
min 3.450700 3.638400
25% 7.409100 7.015900
50% 12.410600 12.435900
75% 13.998100 14.242900
max 149.036200 149.656500
Tick time:
tick_time222043(bleed) tick_time221923(this commit)
count 2366.000000 2366.000000
mean 4.762923 4.275833
std 3.240976 3.206362
min 0.263900 1.653600
25% 4.145375 3.668600
50% 4.779350 4.240050
75% 5.232575 4.611775
max 85.751800 87.387100
Shroud.touchedCount to avoid Tick updates if no cells touched.
Avoids iterating over all map cells of the `touched` cell layer.
Tick time improvement of 40%+ - during at least the first two
minutes of gameplay.
During the first minutes of a game - out of every 1000 ticks
only 10-100 result in the Shroud - of any player - to be touched.
For certains player types (Neutral, Creep) less Shroud updates
are expected throughout a complete game.
Throughout a complete game human/AI players can also have no
Shroud touches during certain Ticks.
All targetlines can now be set to a custom color in yaml or set to be invisible.
All automated behaviours including scripted activities now have no visible target lines.
- Distinguish between missing sequences and missing sprites
- Lint default sequences as well as maps
- Improved performance
- Correctly handle null images