Optimal Usage of Instantaneous Displacements in Games
Introduction
Mathematics is capable of describing much of our universe. It’s no surprise then that it also describes the games that we play. After all, League is a video game (electronic game). Electronic games follow the rules of logic, which are themselves embedded deep within the underlying circuitry of the tools with which we use to play these games. Because a countless number of these logic gates are responsible for the resulting “game” that we play, the game also necessarily follows the rules of logic, and by extension mathematics. However, the actual gameplay that results once the human factor is put into the equation is determined just as much by the factors that constrain it (the various complex systems of logic that arise from the game’s written code) as it is by the players that play it. That is, the seemingly restrictive schemata upon which the game rests are not necessarily binding phenomena – gameplay doesn’t just happen with the existence of those rules themselves alone. The rules of the game merely exist coincidentally alongside the player, forging an amicable symbiotic relationship. This fact is most visible when players discover a bug (an undesired form of gameplay that emerges from the game’s “rules”), as well as when they discover a “feature” (mechanics such as input buffering). Ultimately, the rules of a video game are themselves hidden behind a metaphorical fog of war composed of fancy animations and visual effects (surprisingly, these sensory tricks are precisely the primary source of revenue for a multi-million dollar game company) and entirely dependent upon the player to discover what about them makes “gameplay”.
Enough about how gameplay emerges as a total greater than the sum of its parts, though. The purpose of my post today is actually to discuss the importance of timing in the use of instantaneous displacements in video games (usually RPGs, action games, or any video game that coordinates movement of points along a Cartesian plane), which I shall refer to as “ID” from this point forward. The optimal time at which to use an ID can be discovered using mathematics, coincidentally. I shall demonstrate this with some hypothetical scenarios once I’ve properly introduced how this relates to League of Legends in particular.
Relationship of Instantaneous Displacements to Distance Management Mechanics (Kiting) in League
Summoner Flash is the most popular spell pick across all regions. It teleports your champion 400 units in the direction of your cursor. Ignoring any added effects and quirks of the spell, such as that which catapults you across a piece of terrain should you land past the midpoint of the line segment that lies on the line passing through your champion and the cursor and that connects the two points on the perimeter of the piece of terrain that also lie on the same line, Flash is largely a very predictable spell with a very predictable outcome. Upon activation, the ID translation distance is 400 in any direction, period. Now come the tricky questions related to the actual gameplay. If Flash is so singular and straightforward, why then does it seem to elude explanation when certain Flashes result in a hasty and successful escape, while other Flashes provoke extra aggression from the ganker, leading to a kill? Could this possibly be explained accurately within the realm of mathematics, or is it a phenomenon that arises solely from the added complexity of the human player within the context of the game?
Regardless of the answers to those questions, mathematics is still capable of providing us with a sound understanding of what goes on during such an encounter. Let us examine the following hypothetical scenario. We have an incoming ganker, A, who wants to score a kill on the laner, B. Ignoring the possibility that the ganker will be influenced by any psychological tricks or gameplay-dependent phenomena, let us assign to our ganker the task of moving toward the helpless laner in the most efficient manner possible. Upon reaching B, A will hit B with a form of hard crowd-control that will inevitably lead to B’s grisly demise. A will be used both to name the ganker as well as to indicate the ganker’s initial position, and likewise with B for the laner.
In Scenario I, the distance between A and B is equal to the distance between B and B’, which will be B’s point of safety. This can be a Thresh lantern, a Bard ultimate, or the turret – it doesn’t matter. A is moving at √2 times the speed of B (in actual gameplay this can be imagined approximately as a Master Yi with boots and his ultimate activated moving towards a Zyra support without boots). B reaches B’ in the same amount of time that A reaches B’, even though A is further away from B’ than B, because A is moving faster than B.
The question posed is therefore: when will an ID used by B create the most distance between A and B if A is moving at √2 times the speed of B and A is moving towards B’s destination at a 45-degree angle?
[]http://imgur.com/a/qSQ07 (The illustration above depicts our current scenario, which we shall aptly name “setup”).
Well, let us pick three arbitrary test points along the path B to B’. Both the time it takes for B to reach B’ and distance between B and B’ in these test cases will be 10 (10 increments of time to reach B’ and 1 unit of distance per 1 increment of time). We pick 10 because it is an easy number to work with. In reality, the result does not change so long as the statements we accept as true for our setup remain true (namely, that A and B are the same distance apart as B is with B’ and that A is moving towards B’ at √2 times B’s speed). For our ID, represented by the variable x, we choose a distance of 2 (again, this is also arbitrarily chosen and does not impact the results).
[]http://imgur.com/a/6g4gy (The diagrams above depict our three test cases).
Test point #1 shows a percent difference in distance between A and B after the ID is used of approximately 3 percent. Test pointed #2 shows a difference of approximately 7.6 percent. Finally, test point #3 shows a difference of a whopping 41.4 percent!
Evidently, as the distance between A and B decreases, the distance gained from B’s use of an ID increases. The distance gained increases exponentially as B approaches B’. The limit of the distance gained as B approaches B’ is equal to x, or the actual distance of the ID itself, while the percent distance gained increases to infinity.
Therefore, the optimal time for B to use an ID without A ever actually reaching B is when A is as close as fucking possible to B. Of course, this is under the assumption that A will not use an ID to reach B. In Scenario II, we can examine what happens when the premises of our setup in Scenario I remain, but A also gains the ability to use an ID during the chase.
[]http://imgur.com/a/m1FsQ A’s most efficient path towards B will still be to move in a 45-degree angle. The dotted lines in the diagram represent a potential ID used by A at any given point during the chase, up until the last bit of remaining distance between A and B is equal to the distance of the ID itself. This point is the critical point at which if A uses an ID, A will instantly close the gap to B and render B’s screen gray. B of course is unaware because B expects to use an ID at the last possible moment in time. A clearly has the advantage if A is also capable of using an ID.
Results From this thought experiment we can see that mathematics answers our questions posed clearly and concisely. The optimal strategy for B is to use an ID right as A approaches it. The optimal strategy for A if A also has an ID is to use it before the distance between A and B becomes less than the distance covered by the ID. It is also probably a good idea for A to hold the ID until the critical point is reached for obvious gameplay reasons – unlike the situations posed in this thought experiment, real gameplay is far from perfect and carries unexpected variables.
Discussion Of course, our thought experiments only depict a specific scenario in which both our premises are true. However, although not included within our limited number of tests above, the optimal strategy for B will almost always be to use an ID when A is chasing B directly (A is moving towards B on the same line B is moving towards the destination or point of safety). The thing B must keep in mind is the critical point – A’s potential surprise ID may well be worth the use of an ID from B preemptively if B determines it is the case that A will definitely score a kill if A closes the gap. Also left out are the numerous interactions that exist in League of Legends – Elise, for example, has a ranged stun that effectively renders her “location” in the scenarios we used above as all the possible points her stun can reach. Other types of ID and dashes accomplish similar feats, with dashes effectively functioning as IDs after they’re time adjusted (travel time of the dash is taken into account) in our scenarios. The actual game that we play is simply far too complex for any simple generalizations to be made consistently, but the generalization exists whenever the situation in an actual game presents itself opportunistically as similar to the situations we examined above. In those situations, the generalizations made by our thought experiments leveraging mathematics can be thought of to be true so long as the similarity between the game situation and the situations we accounted for with the mathematics is retained.
Notes Thanks for reading. Means a lot to me if you actually went and bore with me the entirety of the post. I’d love to know what you fellow Summoners think – leave a comment! In fact, the entire purpose of this post is to see what responses you guys have to using math to determine optimal stratagems in games. After all, games themselves obey the rules of logic and math, even if you don't actively do any calculations as the player. If I’ve made any mistakes in my work, be sure to point it out to me as well. The results of our study can be applied to all IDs that exist in any game that uses a Cartesian coordinate system, so it may be of interest as a piece of thought for any video game designer using such a system. And here’s the TL;DR for those of you too impatient (frowns in disapproval).
TL; DR,
- IDs such as Flash create the most distance between you and a chaser when you use it in the direction a chaser is traveling to reach you or when the chaser is as close to you as possible when traveling at an angle towards your path of escape, as proven by mathematics (yay math!). In other words, don't Flash immediately when you see the jungler coming at you from the side - it's seriously making you lose.
Love, Cardi
(How creepy is it that the entirety of this post and all the comments posted already existed in the Library of Babel?)
"Function over Form".
main though?