Ramblings on game analytics

Game Balance: Transitivity and Cost Curves

What is transitivity? This was tackled in an earlier post already, but transitivity means that properties and relationships between objects transfer. For example, if A > B and B > C, then A > C. If A > B and B > C but C > A, then this is a non-transitive relationship. Such a relationship exists in rock-paper-scissors.

What are cost curves? Cost curve is a synonym for power curve and both are used interchangeably in game design. A cost curve models the relationship of costs and benefits in a game and indicates the fine line on which the costs and benefits of a game object (sword, ability, damage modifier, etc.) is balanced. If something is considered to offer way too good benefits in relation to its costs, it is considered to be above the curve. Same goes for game objects that offer too few benefits for too high a cost - these are under the curve. Although game designers typically strive for balanced gameplay, peaks and troughs can be found and often desirable as well to not make the gameplay too dull. In the long run for some games, namely collectible card games (CCG) or multiplayer online battle arenas (MOBA), there tends to be power inflation with new expansions, sets, or heroes added to the game. This is because the new objects added to the game are designed to be desirable to use for the players and thus they are typically modelled after the most powerful currently existing objects in the game. Then there might be a very slight power creep in the set to entice players to use the new stuff more which leads to the next subsequent expansion to be modelled after a slightly higher cost curve than the original one. Of course, in MOBAs there are frequent balancing patches trying to makes old characters viable to play and sometimes even complete reworks of characters to better fit them in the new cost curve. In CCGs though, such issues are hard especially in the real-world. You can’t really change a card after the release without issuing an errata and relying that every player in the world has read and understood that something regarding the card has been changed although the ink on the card states differently.

Let’s examine how Hearthstone, a digital CCG, has tackled this power creep. In the very beginning of the game there weren’t that many expansions, of course, and cards felt fairly well balanced. The very first expansion was called Curse of Naxxramas, which added new cards into the mix and changed the meta quite a lot. Within that set there was a legendary minion called Kel’Thuzad among others that had their unique effects. Kel’Thuzad was not limited to one class deck type but could be placed in any deck since it was a neutral class card. The minion had the effect that it resurrected all minions that died on the turn at the end of each turn. I remember when that expansion came out, almost every single deck had Kel’Thuzad in it and if you didn’t have it, you almost certainly lost. This continued for a while that Kel’Thuzad was almost an obligation to have in any deck and there wasn’t really a good reason to use other cards to replace it. I remember Kel’Thuzad disappearing from competitive play only when Blizzard created different game formats to push players into using the new card sets. Blizzard created standard and wild game formats, in which the first format only core cards and last two years of cards could be used and in the second all cards except classic cards could be used. This mitigated the effect of having to deal with extremely powerful combos that they hadn’t taken into account in standard format.

Utilizing the cost curve

To balance existing items or creating new items, designers utilize the cost curve. They assign certain benefits certain values and likewise determine the cost of them. This is called the supporting math of the cost curve and it really doesn’t matter what scale of numbers you give as long as you are consistent with it. Let’s say we have a set of weapons that need to balanced and weapons only three attributes - power, armor penetration, and cost. We’ll first create four weapons:

Weapon Power Armor penetration Cost
Mace 6 5 10
Sword 4 4 7
Flail 4 6 9
Warhammer 7 5 11

Assuming that these are all balanced, we can start to deconstruct the weapons into the underlying supporting math. First off, we can add up the benefits of each weapon (Power + Armor penetration) to get the total benefits. Mace 11, Sword 8, Flail 10, Warhammer 12. Now let’s look at the costs and substract the cost from the benefits. Mace 11 - 10 = 1, Sword 8 - 7 = 1, Flail 10 - 9 = 1, Warhammer 12 - 11 = 1. All of these weapons seem to get a value of 1 and if our cost curve base value is 1, we’ve done a spectacular job in balancing. We can now use this base value of 1 to create completely new weapons by just defining that the (power + armor penetration) - cost = 1. We could also go back to pre-existing weapons to check the balance and readjust the values if some weapon feels over- or underpowered. Imagine we had a weapon, a spiked whip, with the power of 1, armor penetration of 2, and a cost of 3. This would result in (1+2) - 3 = 0! This is surely an underpowered weapon so how do we balance it? There are three options: either add 1 to power, 1 to armor penetration, or lower the cost by 1. This would result in the value of 1 on the cost curve and thus balance the weapon.

Cost curves in F2P games

I’ve mentioned this in another post already, but F2P games utilize cost curves to “ramp out” non-monetizing players. The first few days of retention, D1 through D3, might be completely playable without paying anything in the game and the game not feeling “grindy”. After some point though when the player has already invested some time into the game, the game starts to get progressively harder and harder above the curve. This means that when previously the player was able to beat levels and do tasks with great points or ease, they now start to perform poorly or struggle to keep up with the game. The difficulty is ramping up faster than the player is able to farm resources, troops, power-ups, or whatever the case may be. This could also become apparent when monetizing players start to buy legendary units that a non-monetizing player can’t acquire for a long time and thus the monetizing players dominate the non-monetizing ones. The purpose of the cost curve in F2P-games is to find a sweet spot for increasing the difficulty enough for the players to struggle keeping up and enticing them to pay without making it too obvious or expensive. Same goes for continuity, the difficulty shouldn’t progress exponentially now that the monetizing player has paid but they should instead feel like they are doing great again. This might sound a bit harsh for some, but F2P-games also need to pay the bills somehow if not through ads.

Another way of addressing balance issues

Depending on the game type, there might be many different ways to address balance issues. If, for example, a boss was shipped out with double the amount of hit points than what was meant, you could just patch that out and be done with it. But you could also embrace the new boss and the double HP situation. This could be done by offering players an achievement for beating that boss if it’s and optional one, since it doesn’t block the player from progressing through the game. You could also keep the boss the way it is and use it as a gate keeper for a completely new area or biome that the player can enter after defeating the boss. You could adjust the rewards of the boss to be double the amount of what is given or give a unique item drop. There are more creative ways to address balance issues than to just increase or decrease some arbitrary value - go nuts.

Balanced and unbalanced in Unmatched

I really like the aesthetic of the board game Unmatched. Although, I can see a few problems with the balance of the game. Some heroes feel like they are definitely more powerful than others from the get-go and some abilities or cards just feel like they are not even worth playing due to them being so underpowered.

What feels very well balanced in the game is the mechanic of melee and ranged attacks. The boards are divided into different sections by the color and pattern of the circle. Here’s and example of a board in the game:

Melee attacks can only be executed if the unit attacking is standing next to the target (circles connected by black line). Ranged attacks on the other hand can be executed if the attacker and target are adjacent or in the same zone. This means that they need to stand on circles that contain the same color. So if a character is standing in the green zone, a ranged attacker needs to get close enough to attack within the green zone as well. This pushed the ranged attacker in the example board to a maximum distance of 3 of the target. Since players only have two actions per turn, e.g. move and then attack, the ranged attacker will stop at the distance of 3 after completing the attack (let’s ignore special effects). This allows for melee attackers to get close and attack as well. If ranged attackers could attack from wherever to wherever, it would mean they could just sit in the back corner and take potentially 3-4 attacks before a melee attacker gets close to them. Moreover, a lot of cards have special movement benefits that close the gap between ranged and melee attackers even more, and ranged attackers can also utilize these movement benefits to try and stay away from melee attacks. All in all, it’s a very enjoyable mechanic.

One thing that’s extremely underpowered in the game is King Arthur’s special ability. When King Arthur attacks, you may BOOST that attack. Play the BOOST card, face down, along with your attack card. If your opponent cancels the effects on your attack card, the BOOST is discarded without effect. This game is a lot about resource management in terms of tracking what cards are in your hand, your deck, your opponents hand, and their deck. When attacking in the game, the attacker puts down a card face-down and the defender chooses what card to defend with or do they want to defend at all. The problem with defending is that you don’t know what attack is coming, is it a big damage value card or does the card have a special effect you definitely want to mitigate? Therefore, when the opponent (the one playing King Arthur) plays down two cards, you already know that you are getting quite a lot of value for just cancelling the effects of that attack, a 1 for 2 cards trade. This makes playing against Arthur relatively straight forward. Save up all of you feint cards (card that cancels the effects of the attack) and just play other defensive cards for single card attacks. I would suggest to fix this issue by adding more cards to King Arthurs deck, allowing him to have a bigger hand size, or adding a special rule that he gets to draw one card if the special card was cancelled. This still makes him burn through his deck quite fast but at least addresses the issue of having such a horrible special ability.

Unmatched supporting math

I tried to identify some supporting math behind Unmatched by first looking at the heroes and then the cards. The heroes are pretty cumbersome to analyze due to so much uniqueness that they don’t really compare well - so I abandoned that endeavor. Looking at the cards though (only cards in more than 1 deck), we can try to identify some powerful, balanced, and underpowered cards. I first listed all of the cards that are shared across decks, excluding Gaze of Stone, listed it’s value, when the special effect takes place (immediately, after combat, during combat), and what type of special effect it is (cancel, draw, move, damage, or combination). This is still just a bit simplified but then I put out some arbitrary bonuses based on my own experience for how much the card type and what kind of special it has. Based on this I put a base value for any card to be 6 meaning that with it’s stats, type, and when the special effect takes place, the values should add up to 6. I then plotted all shared cards onto a scatter plot to identify whether this supporting math is getting close to reality. Here’s some supporting math:

Card type Value
Hybrid 2
Attack 1
Defense 1

Card type values

Special effect Value
Discard 2
Move 1
Draw 1
Cancel 2
Damage 1
Two effects bonus 1

Special effect type values

After some calculations we’ve got this kind of a plot with common cards:

According to my formulas, cards above 0 value can be considered more powerful than others while cards under 0 can be considered underpowered. The further they are from 0 the more powerful/underpowered they are. Looking at the chart I actually managed to get the values pretty close to each other which indicates that I might be quite close to reality (assuming the designers have strived for balance between cards). This is not surprising that they don’t line up completely on 0 for two reasons. First, I did this based on experience and some fiddling. Second, these cards differ from each other greatly in their effects and aren’t directly comparable. Furthermore, if everything would be at 0 it would be quite bland that all cards are perfect. Having a difference in the power of the card creates tension and excitement in the game.

Making a sanity check on the chart, Regroup seems to be extremely underpowered with a value of -2, why? Well, Regroup has a value of 1 which is terrible although being a hybrid card. Every single defense card (even Bewilderment which has a defense value of 0) beats the attack value of this card. The only chance to get the attack through and subsequently trigger the After Combat effect of drawing 2 instead of 1 cards, you are relying on the opponent not defending at all. Now let’s look at a card above 0, Ambush for example. Ambush has a value of 2 but it can only be used for attacking. What makes this card very powerful is that the special effect makes your opponent discard a card and you add that discarded cards value to your attack value! So basically even if your opponent does defend, they are forced to discard another card and in effect boost your attack - damn! In the game, cards in hand are very valuable and you don’t want to burn through your cards too fast. Therefore, forcing your opponent to discard a card is very powerful. Let’s examine another one above 0, Exploit. Exploit has a value of 4 but the after combat effect is to just draw one card. Why is it above the curve (over 0)? Well, exploit is a hybrid card, meaning you can use it for both attack and defense. The biggest attack card currently in the game is Ox Form in Sun Wukong’s deck but the defender can boost their defense value. Then their are multiple 6 value attack cards, mitigating 4 is quite huge especially considering you still get a card back. Those high attack values of 6 or even 5 don’t appear often in decks and are fairly limited. These are usually used as finisher to devastate the opponent with massive damage, but having a 4 value hybrid with draw is really really good against that.