Analyzing ARPGs
Which is the most effective way to play them?
Let's model some facts about Action RPGs with some simple math.
How big a benefit has offense vs defense? What about Life Steal? Ranged Attacks? Stun? What should I do? How can I be effective?
Scientific Modelling, Problem Solving, Optimization, Game Design, Game Mechanics, ARPGS
November 1st, 2013
And by best, I mean, the most efficient way to finish an ARPG. Let’s develop this idea. An ARPG can be thought of as a series of Fight-Reward cycles, with increasing variety of attack choices and scaled difficulty and rewards.
There are several sets of choices in ARPGs.
- Character type.
- Skill trees.
- Attack choices.
The game itself consists of a series of functions.
- Enemy difficulty scaling.
- Enemy reward scaling.
- Fight-Reward cycles.
Let’s take a free to play ARPG game for analysis, Path of Exile. Let’s assume we choose the Templar class. Templars are akin to the stereotypical Warrior class but capable of both swordplay and magic, Templars are an excellent class to showcase the comparison that I am about to do.
As everyone with experience in ARPGs knows, it is almost of no use to buy items from vendors on towns. Almost all the time, your best apparel will be found by killing special critters or by sheer random chance. It is a staple of this genre to have randomly generated items as well, so we must ignore, or otherwise simplify this part of the problem.
Let’s focus on some of the melee weapon choices present in Path of Exile.
- Single one-handed weapon
- Two one-handed weapons
- One-handed weapon and shield
- Two-handed weapon
There’s only two variables here: Attack and Defense. And we might as well read them as:
- Some attack
- More attack & some defense
- Attack & defense
- More attack
Now let’s define a Fight-Reward cycle.
- Player engages an enemy
- Both exchange attack & defense choices
- Fight ends, and either…
- Player wins and gets reward (items, xp, etc)
- Player loses and gets punished (death, respawn, runs away with less health, etc)
Since we’re looking for the most efficient way of fulfilling these Fight-Reward cycles we need maximum yield with minimum effort, I will optimize for time, which means killing the enemy in the least amount of time.
Let’s assume the player and the enemy take turns to exchange their attack & defense moves. There’s at least one easy to think scenario where the player has an apparently optimum solution.
- Player attacks
- Enemy loses all hit points
- Player wins
The player could have 1 hit point, and this example cycle would always be good. This is the idea behind every Glass Cannon class.
Let’s look into a more traditional scenario.
- Player attacks
- Enemy loses some hit points
- Enemy attacks
- Player loses some hit points
- Start again from step 1. Rinse and repeat until someone dies
- Player wins (most of the time)
You might picture yourself two boxers standing in front of each other, taking turns to hit themselves until death. In fact, it was abolished by the Roman Empire in 393 AD.
“Fighting” from one side becomes a sum of the series of attacks. When this sum is equal to—or larger than—the enemy’s hit points, the fight is over.
(Number of attacks) * (damage of each attack) = (target hitpoints)
The same applies from the enemy’s perspective. A single one-to-one fight is nothing more than a race for hit points.
Behind all their randomness, these games are deterministic and at low difficulty levels there is a guaranteed chance that the player will win. If the whole enemy horde came one by one, any player would easily beat them, including the occasional mini-boss or boss.
As all who have played an ARPG know, one-on-one fights are not what you usually see. The most common scenario is this:
- Player attacks
- Enemy loses all hit points
- Melee enemies surrounding the player attack
- Ranged enemies attack from cover
- Player loses some hit points
- Start again from step 1. Rinse and repeat until every enemy dies
- Player wins (most of the time)
Some ARPG veterans will hate me for saying this, but I have to.
Singleplayer ARPGs have barely any combat strategy and tactics
Take for instance the example being developed, that of the melee fighter. A situation where some kind of tactic must be applied, is when losing hit points. And the options are…
- Quaffing a healing potion. The player heals himself over time. Given that the amount of regeneration is uninterrupted by damage taken, and that it is equal or greater than the damage sustained per second (Healing instantly is also healing over time).
- Quaffing a resistance potion. Nullifying or diminishing the damage/buff being sustained.
- Running. There are two places where you can run, either not too far away, or straight back to town. Running not far, is meant to reduce crowding and get the chance to regenerate and pick off some stray enemy. Straight back to town, means using any speed boosts and getting home to replenish for supplies.
- Letting yourself die. Which in Path of Exile is a valid option, as dying teleports you back into town (counting as a free Town Portal Scroll), without losing any of your items and/or experience.
Some other very old tactics of the genre include grinding—farming low-level monsters repetitively—and using chokepoints to reduce crowding, like we old Diablo I players did by standing at a door killing whatever comes out of it.
With regard to combat strategy, there seems to be little other than being more powerful than your enemy. And this is where the real strategy of the genre lives, on HOW to be more powerful than your enemy: character builds. ARPGs are games about character development, a power-gaming ARPG player will plan its build up until its final level.
Experimenting with different builds takes time, and players alleviate the burden by sharing their knowledge of the game in forums or developing tools to aid them in their character building efforts.
The complexity of builds, and their skill and passive trees, give depth to an otherwise shallow type of game. And that is a big reason why, in contrast with single-player strategy and tactics…
…multi-player ARPGs strategy and tactics are not simple
However, this point has little to do with the initial question. Which is what I will continue to develop.
AoE vs PtP
There are different ways of attacking enemies in ARPGs. Of course there’s melee blows, missile ranged attacks and lots of kinds of magic. What I’m talking about it’s an encompassing definition, its point-to-point versus Area-of-Effect (AoE). And the difference is brutal, basically…
Point-to-Point adds damage, Area-of-Effect multiplies
Damage functions, at large, can be simplified to a very short equation:
f (x) = a * x
Damage (# of enemies) = (Action damage) * (# of enemies)
Simply put, AoE targets more than one enemy, and this is a REALLY good advantage, as in these games you’re always a one-man army cutting your way through lots and lots of monsters. Statistically speaking, most of the time you’ll be surrounded. So a very good bet is to have a very powerful AoE move always ready, spamming it until the final boss fights.
If the game is any bit similar to Diablo installments, bosses will differ only in the level of attrition necessary to kill them. You will encounter them, manage to land some hits on them, heal until depletion, fight again, go back to town for more refills, and fight again, until he/she/it is dead.
Design considerations are always on the table, and game designers are very much aware of what they’re doing (I hope), so AoE moves always inflict less damage than point-to-point because of this “multiplication” issue.
Wizards are polynomial, Warriors are linear
Mages have always had less dependence on items than Warriors. A Warrior can be the greatest on Earth that he will only dish out as much damage as his sword (and scaling) allow, he has a bottleneck on his weapon.
As we all know, there’s scaling rewards with level progression. Since the mage depends less on items, some of this scaling should be translated to magic, at least for balance’s sake. This is very evident on old BioWare’s RPGs, like Baldur’s Gate 2, that feature the Monk class, a fighter that relies on unarmored blows. Monks become really powerful just by levelling, as do their magical counterpart the Sorcerer (who gains spells at level-up).
While a Warrior relies on its strength and the items it gets to showcase that power, Mages/Sorcerers gain really good AoE moves and power, just by levelling. For comparisons’ sake, this would mean awarding a Warrior with a free level-scaled weapon each time it levels-up (which is in fact happening to the Monk Class).
If the game, for any reason, allows for combination/synergy of spells, the gap becomes even wider. Again, a BioWare game (Dragon Age Origins), showcases this in extreme ways, up to the level in which the game’s combat system is broken.
In Dragon Age Origins there is no need for Warriors, status ailments and sheer magic power make warmongering brutes with halberds look like imps with sticks. A combination of AoE spells (Blizzard and Tempest) synergizes, and where a big fight would’ve taken place, you just move closing doors—you can cast out of your line of sight—and “clearing" rooms. The combat system is in such a state, that even the traditional Warrior role of tanking (a damage sponge) can be fulfilled by mages. But most of the time, your enemies will be too frozen, stunned or otherwise disabled, for anyone to need to tank, except for the occasional Dragon fight.
The underground world of Rogues
Rogues have always relied on trickery and stealth. Yet, for the purposes of beating most ARPGs, they happen to be just another class of warrior with parallel abilities.
Where a Warrior has armor, resisting attacks, a Rogue has evasion, dodging them. Where a Warrior has strength, rising his attack damage predictably, a Rogue has dexterity rising its attack speed, accuracy and chance of critical strikes. Both are ways of dealing more physical damage and taking less.
While they work differently, in essence they’re the same
For example, let’s expand the common damage dealing function to include critical hits. Critical hits are bonus damage on a random chance. Let’s call that chance CC (Critical Chance) and the bonus CB (Critical Bonus).
In the previous equation, damage in function of enemies was damage times the enemy, where damage was “a” and the number of enemies were “x”.
f (x) = a * x
Critical Chance can be added to the equation with a simplifying assumption, which is that over a series of N attacks, at least CC x N will be critical strikes. (E.g. 10% critical chance, 100 attacks, 10 critical hits) Then damage with critical hits is:
A = (Flat Damage) + (Flat Damage) * (Critical Chance) * (Critical Bonus)
Factoring it a bit, gives:
A = FD * (1 + CC * CB)
The difference with the traditional way in which damage scales for Warriors, which is as a fixed percentage per strength point, is that you have the trade-off of choosing to score more criticals, or better criticals.
Evasion, or the chance to dodge an enemy attack, is the exact same thing. Although many games will choose to implement it differently or have their own intricate mechanics.
Let’s pick our previous equation and add it some more variables: Accuracy and Evasion. These two variables are related, let’s use a simple model and say that evasion undermines accuracy by reducing its chance to hit. So then, an attack either hits scoring full damage, or not, for zero damage.
F(x) = a * x * (ac – ev)
It becomes clear that physical invulnerability exists here. As something with very high amounts of evasion will never get hit. Game Designers are not stupid, and include caps for this tricky stat.
How does armor work in these games? It reduces damage by a fixed amount. How did strength affect damage? It increased damage by a fixed amount. So then, how did dexterity increase damage? It provided a CHANCE to hit more. The same thing evasion is doing here to reduce it.
Attack speed is just another variable to be multiplied, obviously rising the amount of times a critical hit check is thrown.
The stereotypically preferred way for a Warrior to deal large amounts of damage is by wielding a two-handed weapon, for Rogues it is dual-wielding two weapons. By doing so Rogues get two checks for critical damage instead of one. Mechanics vary with games, and the difference might seem bigger than it is, but in my humble opinion it’s more cosmetic than anything else.
Sword & Shield, Paladin Style
The very traditional attire of the knight in shining armor rushing to rescue his princess from the Dragon, a sword to strike its heart and a shield protecting against dangerous fire. Some ARPGs conspire against the very nature of shields. Let’s see why
First of all, shields have a big cost of opportunity, either you use a shield, a second weapon, or a bigger weapon in both hands. Its damage versus survivability, and damage is usually more important.
It all comes down to the Fight-Reward Cycle, these cycles have got speed, and this speed is directly proportional to the damage you deal, up until you one-hit-kill everything. Remember, it’s a race for HP, and truly analogous to the physical equation for distance (speed x time). Hit points are the distance you need to cover by attacking.
Hit Points = (Attack Damage) * (Attacks per Second)
What changes things, is that the cycle provides accelerating returns. A Fight-Reward Cycle has two Rewards: experience points and/or items. Both increase your damage, and analogous to the Warrior/Rogue differences, experience points provide a reliable increase, and item drops a chance of increase.
AD(Experience) = Attack Damage + (Attack Damage * Experience)
ApS(Experience) = ApS + (ApS * Experience)
The same goes for item drops, so I won’t add an equation almost the same as the last. Remember that each Fight-Reward Cycle is a race for hit points, let’s get it all together.
Hit Points (Experience) = AD (Experience) * ApS(Experience)
Coefficients for ApS and AD increments (from XP) will mostly vary, but for the sake of abstraction let’s assume they’re the same. Also, let’s consider that “Experience” also means “Better item drops”. These are two big assumptions, but they work for demonstrating purposes as both things increase your attack in function of time.
HP(XP) = (AD + AD * XP) * (ApS + ApS * XP)
HP(XP) = AD * ApS + 2 (AD * ApS * XP) + (AD * ApS * XP^2)
Let’s make AD * ApS a single constant, called A.
HP(XP) = A + 2A * XP + A * XP^2
Then the returns of investing on attack are.
HP(XP) = A (2XP + XP^2) = A(XP(2+XP))
Merely to illustrate the issue, making A = 1, and XP = X, gives us f(x) = 2X + X^2, and graphing it gives us:
If enemy difficulty didn’t scale, ARPGs would be very short games.
This spherical cow does not include the fact that there’s a minimum time in which a human being can click and kill, or move and spam AoE spells. Sooner or later this function reaches a plateau. That plateau being the fastest speed at which an ARPG can be beaten.
Regarding Path of Exile, I have little data on how the blocking system works. It’s capped at 75%, blocking works like evading (i.e. avoiding damage) but can’t prevent you from being stunned, and not only shields block, staves and dual-wielding give blocking too.
When making a choice between more damage and more defense, you should consider that while returns in attack are by themselves exponential, returns from defense are not. The amount of damage blocked depends on how much damage your enemies deal, it will vary from game to game; and it is very likely to be linear. The reason is simple: if enemies get exponential increases in attack, the game will become exponentially difficult which will most likely lead to less player enjoyment. Nobody likes to die in games.
However, there's a caveat to this consideration: gains in experience usually get exponentially difficult in games.
Life-Steal, the Game Breaker
This is the really disruptive element in ARPG mechanics. Life Stealing, or Vampirism, is gaining health from attacks. Whether the gain is a flat amount of HP per attack, or a percentage of it, LS can get out of control easily. With high amounts of LS defense becomes irrelevant, as long as you deal more damage than you receive, you're well off being vampirically immortal. The only thing that can stop you is not being able to attack, thus receiving more damage than you deal.
We've seen that Attack scales very fast with Experience, well there's several ways in which LS might scale.
Life Steal(Attack Damage) = Attack Damage x Life Steal Percentage
Life Steal(# of Attacks) = Flat Life Steal x Attacks
Life Steal(Attack Damage, Attacks) = AD x LSP + FLS x Attacks
If the gain is flat, you should get Attack Speed; if the gain is a percentage, Attack Speed and Damage. Remember that AS can be calculated as some kind of percentile gain on your AD, so when trying to determine which one to get you need to check which gain gives you more damage per second; e.g. +10 AD or +10% Attack Speed, well if your current Attack Damage is 100, it doesn't matter. Although, it is more likely that AS boosting items are scarcer, so you should take in account all of your upgrading options.
There are several situations that limit the usefulness of LS, and those are:
- Getting damage from traps
- Being out-ranged
- Life Steal immune/resistant enemies
- Being stunned
The good thing is that most of these situations are not of much concern in modern ARPGs, as there's not many traps, the amount of enemies that out-range you are able to kite is almost nil, and there's not many LS immune enemies. However, being stunned is a real danger. There's a lower bound on the effectiveness of LS, and that is:
Having enough HP until you can Life Steal again
This would mean having enough Hit Points to resist being stunned and under attack. Apart from this consideration, LS is the best way to gain survivability in any ARPG.
Disabling Enemies, or how Dragon Age: Origins is broken
Apart from all of the above, and in spite of characterizing DA:O as an ARPG, there's the element of disabling. Whether you stun, freeze, levitate or otherwise incapacitate an enemy while still being able to hit it, disabling is very important. Like Life Steal, it can be a disrupting thing; and in DA:O it certainly is.
For example, let's say you played DA:O—which has a party of 4 characters—with 3 mages and a rogue, by choosing your spells well you can have a large number, if not all, of your opponents frozen, paralyzed, sleeping, trapped, and/or otherwise incapacitated to fight. Except for those cases in which an enemy inflicts damage by an act of presence (aura), disabled means 0 damage.
This has the great benefit that in many cases it allows you to arrive to the optimal state of killing without taking any damage, it seems a good offense IS the best defense after all.
Resistance and Penetration Mechanics
Armor, Elemental Resistance, Armor Piercing, Magic Penetration, Fire, Ice, Slashing, Piercing, it's all the same: resistances and penetration. Except for the instances in which an enemy is immune to some type of damage, resistance and penetration mechanics offer only a multiplier over the previous equations and must be thought about in a case by case basis. Most likely you will barely pay attention to this, except when someone's immune.
Ranged Attacks
Ranged Attacks are interesting, while a bow will limit your usage of shields, the fact that the enemy is most likely out-ranged gives you a more than reasonable defensive benefit. Most of the time it will lead to optimal cycles where you kill fast and without taking damage. Additionally it provides you the chance of performing some basic tactics like kiting.
How can we measure the effect of distance in defense? Well, it will depend on whatever it is you're shooting at, if it can hit you or not, and how fast it moves. Assuming the enemy is out-ranged, it is:
Defense Boost = Enemy DPS * (Distance / Enemy Speed)
Since enemy attack scaling is very likely to be linear, and you are bounded by the limits of your screen and zoom level, we can safely suppose that distance will be a constant and enemy speed will vary between respectable limits. Using a bow, then, it is more or less the same as having a shield equipped.
In addition, ranged attacks provide an offensive boost from the "free" attacks you get before an enemy reaches you.
Attack Boost = Player DPS * (Distance / Enemy Speed)
Game Designers are not stupid, and perhaps this is the reason why bows deal less damage than swords in most ARPGs, to compensate for this Attack Boost.
A Sufficiently Hard Disabling Vampiric Glass Cannon
I might be missing some points, but I'm led to believe that this is it. The most effective way to play an ARPG (singleplayer) is to deal as much damage as possible to as many enemies at a time as you can, while being sufficiently elusive/tough/vampiric/disabling/distant as needed. Attack first and foremost, defense later.