Minion aggros - Creep Wave Management [prospection]
--- This thread is exposing embryo reasearches for an upcoming extensive minion guide. There are main questions on this subject that still need to be answered, please share your knowledge! ---
- Introduction
An average player has spent 1.042 hours on League of Legends according to wastedonlol.com. We can say that one would have spent 500 hours near creeps. And yet, little do we know about them.
We do know these basics : http://leagueoflegends.wikia.com/wiki/Minion Taking a more serious glance at third behavior rule, a.k.a. minions fighting minions.
One huge thing that we do not know is why** creep waves fighting without players are non deterministic.(?)** Run a custom game alone, with no friend in the Rift. Take the classical jungler route. Can you predict, before the 4:00 mark, which side will win on each lane? I bet, you cannot. Why? This is the matter here :)
Post content :
Why, when two enemy waves are meeting each other, minions can wether split or focus fire against enemy? Why do they break formation, on junction, moving to the left or to the right, apparently randomly? This matter will be developed on first part.
We do not know why some minions change aggro, when no exterior force is interfering between two enemy waves. Why would even the siege minion change several times his targeted minion before dying? All minions have the same LoLWiki priority, and yet some melee minions will often change aggro from a enemy melee towards a caster minion, hundreds of units away. The Wiki page mentions two concepts : aggro scan and call for help, which specifics can be core explanation. This wonder is at the center of the second part.
Some fellows were already wondering about minions details in 2012 : http://forums.euw.leagueoflegends.com/board/showthread.php?t=807309, unanswered. My EUW threads :
- http://forums.euw.leagueoflegends.com/board/showthread.php?t=1955093
- http://forums.euw.leagueoflegends.com/board/showthread.php?t=1974525
No answer yet, while creep wave management is being increasingly considered as critical success factor - let us mention SoloRenektonOnly recent Reddit posts : the first of three atm here : http://www.reddit.com/r/leagueoflegends/comments/2jj6pf/a_series_in_creep_wave_management_the_even_minion/ . Incarnation said, in his recent AMA, to be about to publish something about it. Korea is allegedly state-of-the-art for this matter, we do believe that pro players learn there pro tips. But what do we know, except slowpush, in NA and EUW?
I am posting this concern on NA Boards with the hope that Riot dev old-timers, who used to spend time on the forums, could bring us materials!
Have fun, wether in lanes or in the forest, A curious EUW dude.
- Random initial aggro
I have currently come to the point where, to explain this aggro variance, there is wether :
- a lua script memory overlapping at runtime, which can happen with this language - better said a glitch/bug
- a purposely-hard-coded random frequency in aggro scans
- a messaging system for object events, with LIFO stack/state memory
- some map asymmetry and/or mesh (the terrain grid used to calcul trajectories) variations, therefore wave pathing discrepancies between both teams
- randomness in pathfinding updates multithread/time-slicing
This latter seems the best explanation for an external-to-the-industry eye. When LoL was developed, studios already used to multithread. Multithread means that update functions are split, on the servers, in distinct blocs and are executed at different moments to optimize resources and run the application faster, rather than updating the whole game in one cycle. I believe that most companies, at this time, separated general game logic and path finding into two main threads.
I presume here that minions are a division (an instantiated subclass in C++) in unit, itself a division in object in the source code ; I also assume that pathfinding cycles are unit-sized ; clearer said, creep paths would be updated at an individual scale, and each update run at random times? The AI cycle could basically look like this :
THREAD I - Game logic update (game time, champion stats, structure stats, etc.) timex
THREAD II - Minion update -A- Minion update #1 time1-3 ------1. -WaveX-Minion1-Path update time1 ------2. -WaveX-Minion2-Path update time2 ------3. -WaveX-Minion3andsoon-Path update time3 -B- Minion update #2 time4-6 ------1. -WaveX-Minion2-Path update time4 ------2. -WaveX-Minion1-Path update time5 ------3. -WaveX-Minion3andsoon-Path update time6
Assuming that kind of update cycles,** would update intervals be constant or random**?
- Aggro scans and Calls for help
I reached the point where I think call for help usually override aggro scan, hence minions tend to switch target immediately after a damage resolution.
I spotted a complex aggro situation on a replay, which I think synthetize many of the matters. This happens on toplane, on first wave aggro.
Name: Screen1.jpg http://apollo-na-uploads.s3.amazonaws.com/1415748992051/Screen1.jpg
In the first image you can see that, on both sides, each three melee focuses the same enemy minion. This supports the idea that calls for help do not always override an aggroscan : in this situation a melee is issuing two unresponded calls for help which are ignored by the two other friendly melees whom keep aggro on the initial target. What if this initial target is the actual first call for help issued? Then** call for help answered could prioritize upon newer calls issued from the same minion**? The lol wiki behavior paradigms may have to be revised tho!
Name: Screen2.jpg http://apollo-na-uploads.s3.amazonaws.com/1415749006012/Screen2.jpg
In the second image caster minions have begun shooting. In red circles are projectile and caster minion damage resolution symbol. We will focus on third red and second blue melee minions as indicated. They both receive here an enemy caster projectile, which will make them instantly switch aggro toward their caster attacker.
Name: Screen3.jpg http://apollo-na-uploads.s3.amazonaws.com/1415749020890/Screen3.jpg
In third image both melees start moving toward their newly acquired target.
Name: Screen4.jpg http://apollo-na-uploads.s3.amazonaws.com/1415749029576/Screen4.jpg
This fourth image is the most interesting part of the study. In red circle is a tiny melee damage resolution symbol : third red attacked second blue while on his way toward the blue caster. This rings my bell atm, third red put only one auto and then took back his way to the backline. This would argue that aggroscan can sometimes, and temporarily, override call for help?
Besides this little study I think that :
- type of minion do not influence totally on priority levels in calls for help. However I think they may have a little influence, especially with siege minion : to be confirmed.
- the dualism aggro scan/call for help may not be the correct paradigm !
- Current investigations
Here are some points that I am exploring currently :
- what is (are) the frequency in Hz of the (different) AI cycle(s)
- what is the path-finding method for minions waypoints/grid/navmesh/motion planning
- if path-finding is multithreaded, what frequency/how long are the minion path requests? is there a thread per minion?
- are minion paths time-sliced ? smoothed ? are there long/short path requests ?
- what is the collision system structure? How are this latter and path-finding dealing with each other? How are paths recalculated upon collision ?
- networking basics
- Reminder
This is all pure speculation based on my amateur understanding and some feedback from the community. If any developer is hanging around here, feel free to join this topic! If you are not a developer, you are very welcome aswell^^