Balancing Issues

Playing around with and tweaking the three parts of the attack can and will lead to some very interesting combat systems. If you’re not careful, though, it can also lead to some disastrous and un-fun situations. There are a few things we want to avoid. First we want to avoid inadvertently making moves within the same move set obsolete. If we’re going to make moves, there is no point in making a move that the player has no reason to use. Doing so reduces the number of interesting choices the player has. If that number gets reduced too much then the game can become repetitive because the player is executing the same choices over and over again. This may sound obvious, and I don’t imagine people do this on purpose, however it is very easy to do this by accident or even without being aware of it. To avoid this, the wind up, threat, and wind down, of a given attack need harmonize with the hit reaction that the attack causes. More than that they need to harmonize with the attributes of the other moves in the move set and with the moves in the enemy’s move set.

Take a look at the following set of moves.

Move Name Wind up Threat length/shape Wind down Hit Reaction
Player Light 100ms 200ms/front 200ms 400ms
Player Medium 200ms 300ms/front 300ms 600ms
Player Hard 300ms 400ms/front 400ms 700ms
Enemy Punch 650ms 300ms/front high 400ms 700ms
Enemy Kick 650ms 300ms/front low 400ms 700ms

Now balancing will always depend on the kind of game you are balancing for so let’s say that these moves are for a single player game where melee combat is a frequent occurrence, but not the central feature of the game, something like a platformer or an open world game.The player will fight against AI and the average encounter happens in waves of 3 or fewer enemies. Examples of games that roughly match this description are Prince of Persia by Ubisoft and Soul Reaver by Eidos Interactive. Ok, so keeping that kind of game in mind take a look at these numbers and see if you can spot the imbalance. The imbalance here is that all of the player’s wind ups are shorter than all of the enemy’s wind ups. This actually causes two major problems. Compare the player’s hardest attack with his lightest. The wind up is three times longer, and everything else is twice as long including the overall length of the attack. On the face this makes perfect sense, but when you look at the enemy’s wind up we see that the player has 350 milliseconds to notice and react to the attack with his hardest attack. This interrupts the enemy’s attack nullifying it. Usually the theory behind having a fast attack is so you can counter enemy attacks, and to offset this strength you make the move deal less damage. In this case, even though the light attack is 200 milliseconds faster, the hard one is still fast enough making the other movers obsolete. The hard attack can perform the function of the light and medium and it does more damage. There is no reason to use the faster moves, which means that the player has degenerated to having only one move.

There is a second issue caused by the same problem with the numbers. You see because the player’s moves are all faster than the enemy’s it is probable that the enemy will never have an opportunity to attack the player. If the enemy attacks the player first, the player has enough time to counter the enemy and interrupt the attack. If the player attacks first and lands his attack the enemy will not have time to retaliate. Even if the enemy attacks as soon as he stops hit reacting the player still has enough time to counter this second attack. This means that with these attacks the player can interrupt the enemy’s attacks infinitely by spamming attacks. Keep in mind that this is not a problem with the hit react times, don’t forget hit reacts are there to allow the attacker to finish his attack without letting the target retaliate during the wind down. This second problem is not straight forward to solve, and different games will solve it different ways. Now remember this is a game where the player is fighting multiple enemies at once so the battle advantage needs to stay with him, because of this we don’t want to give the enemies moves that the player can’t react to.

Let’s tackle the issues one at a time. As far as the first issue goes, for my example I purposefully picked moves that are more appropriate for a fighting game, where two human players would have very little time to react to one another’s moves. If I were to rebalance the move set, without changing the enemy’s attacks or adding moves, I would make it look like this.

Move Name Wind up Threat length/shape Wind down Hit Reaction
Player Light 300ms 200ms/front 200ms 400ms
Player Medium 500ms 400ms/front 400ms 600ms
Player Hard 800ms 2500ms/front 1000ms 4000ms
Enemy Punch 650ms 300ms/front high 400ms 700ms
Enemy Kick 650ms 300ms/front low 400ms 700ms

Here the player’s light and medium punches are still both faster than the enemy’s however the difference between the player’s medium wind up and the enemy’s wind up is only 150 milliseconds. This means that the player will not have enough time to react to the enemy’s hit with his medium attack; that function is reserved for the light attack. However, because the medium attack’s wind up is still faster than the enemy’s the enemy will never be able to counter the player. I’ve also dramatically increased the player’s hard attack as well as gave it a different shape. This relegates it to the status of special or super attack. Using it at the wrong time gives enemies plenty of time to counter it, and a miss gives enemies a whole second to respond to you. A successful attack, though, will deal massive damage, hit all near-by enemies, and with such a big hit react, give up to a whole second to do whatever you need to do. Now that light attack still poses a problem. It is still fast enough so that the player can lock down an enemy by spamming the attack.

Once again this is not a problem with a straight forward solution. Whatever method we use to solve this problem is going to involve AI and designing adequate behaviors. The usual solution is to add more enemies in conjunction with the behaviors. The idea is that while you’re pummeling one enemy the others try to attack you from behind. Having many targets to keep track of challenges the player to continue his barrage of attacks while making sure the other enemies don’t successfully land an attack on him. Employing AI behaviors like this bring with them their own set of balancing issues. Notice that the total length of the player’s light attack (700 ms) is greater than the length of Enemy’s wind up (650 ms). This means that it is possible to design an AI such that whenever the player attacks an enemy a second enemy can perform an attack at roughly the same time and successfully land a blow 100% of the time. Consider the following timeline of events.


What we’re seeing here is that the player starts his attack on Enemy A at time = 50 milliseconds. Then, Enemy B Begins his attack on the player 25 milliseconds later (remember a computer’s reaction time can be nearly instantaneous). 650 milliseconds after Enemy B starts his attack, at time = 725 milliseconds, that attack begins its threat section. At this time the player is still winding down from his attack and will get hit by the enemy. Whether this is desirable or not is up to the designer and will depend on the kind challenge he or she is trying to create, and its level of difficulty. In this scenario, if the AI is programmed to always respond this way this means that every attack by the player will have negative consequences if there is a second enemy nearby. As a personal choice I do not like these kinds of situations so I prefer to create situations with timelines that look more like this.


Here the player performs his attack at the same time (50 milliseconds). In this timeline however the enemy’s attack will not land until time = 800 milliseconds which is after the player ends his attack and returns to Idle. This allows him to enter his Defense state. Once the enemy finishes his threat section at time = 1100 milliseconds the player can initiate an attack of his own. If the player times his attack well and initiates his attack immediately his 300 millisecond wind up will end at time= 1400 milliseconds and strike the enemy while still winding down. So to achieve this I just moved the time the enemy attacks up. How much will depend on the attacks involved. If you’re going to have the enemy attack while the player is attacking I like to follow the following rule.

Enemy AttackBegin > (Player AttackBegin + Player Attacklength) - Enemy Attackwind up

This will ensure that it is at least possible for the player to respond to the attack, and prevent the player from being able to win the encounter by mindlessly spamming his attack. Now I do want to point something out just so that there’s no confusion. You may have noticed the small amount of time between the player’s actions. Between the end of the player’s attack and the start of the enemy’s threat there is only a 50 millisecond difference, way less than any human’s response time. You may think that this timeline is unrealistic. Well it’s important to remember that once the player performs his attack he has to wait until it finishes before performing his next action, however during that time he can still think about and decide his next action. This means that the player still has the enemy’s entire wind up to think about his reaction and he can then execute that action at any time including immediately after the end of his attack.

The larger the number of enemies the better this works. For this game there are usually two or three enemies engaging the player so this should be fine, but what about one on one matches? Well remember that the player is designed to have a decisive advantage over the enemies, which is why we created mob based behaviors. With these kinds of enemies, one on one battles will always be dominated by the player. If you want interesting one on one matches you will need to give the AI some method to overcome the player’s advantage, and deal with the attack spamming problem. Some simple suggestions include a defense state that allows the AI to counter the player’s attack. You can also modify the hit reaction rules for the enemy, much like in the boss example from the earlier section.

When balancing moves another thing we want to avoid are exploits. In melee combat games this often takes the form of infinite combos. That is, a series of moves that can be continued infinitely and once landed the target has no defense against. Exploits of this kind are incredibly frustrating to a player when he is the target. Since an infinite combo will inevitably lead to defeat for the target of such an attack, the player is helpless to do anything except watch while his character gets destroyed. This feeling of helplessness can instantly turn a player off to your game and furthermore can be very humiliating to some people. This again can make a player not want to play your game ever again. Now, because the ingenuity of your players is limitless it’s no use trying to avoid this problem by testing all permutations of moves. Balancing needs to be done deterministically. So let’s take a look at the causes of these kinds of exploits.

Once again the root cause of the imbalance is that the three parts of the attack and the hit reaction are not in sync. Let’s take a look at this exchange between Ken and Ryu.

First there’s Ryu’s attack.


It is five frames of total animation length and a wind up of one frame. Now let’s say that this attack caused a hit reaction that looked like this.


This Hit react animation is eight frames long and the last frame is the return to Idle. Now when we combine the two what we get will look like this.


What’s going on here? Ryu begins his attack at frame 1. At frame 2 the threat on Ryu’s attack begins and Ken starts to hit react. Now Ryu’s attack is only five frames long so by frame 6 he returns to idle and can attack again. By Frame 7 the threat on Ryu’s second attack begins and connects causing Ken to start his Hit react animation all over again. Now Frame 7 is identical to Frame 2 and the cycle can continue infinitely. In this case at frame seven Ken’s state machine is traveling through this transition.


Meanwhile Ryu is returning to Idle and executing a new attack at frame 6. Like This…


So this is what happens when a hit react is too long, but we also have to worry about the other side of the coin and make sure hit reacts aren’t too short. Take a look at the next set of Attacks and Hit React.

Here we have a kick from Ken.


And this Hit React From Ryu.


Put them together and we have an interaction that looks like this.


The image is a little small so let me walk you through it. In frames 1-4 Ken is winding up his attack and nothing is out of the ordinary. On Frame 5 Ken’s threat begins and Ryu starts to Hit React. By Frame 7 however Ryu’s Hit react is coming to an end, but Ken is just beginning his Wind down. On Frame 8 Ryu has returned to Idle and begins an attack of his own. On frame 9 Ken still has 3 more frames before he returns to Idle, but Ryu has reached the threat of his attack and lands an attack on Ken. So even though Ken successfully landed his attack there is no way to prevent Ryu from retaliating. Aside from being frustrating to have your success punished, this is problematic because this kind of move becomes obsolete, which reduces the number of interesting choices a player has. Furthermore, once this issue is identified by both players the move becomes a liability. This means that if the player accidentally performs this move it can be considered a mistake, and I believe that giving a player a choice that serves no other function than to hurt him is a bad thing. Now, of course, if done on purpose it is possible to give a move like this some feature that makes this weakness worth it and all of a sudden performing the move becomes a calculated risk and the interesting choice is re-established. However it can be very easy to do this by accident and if that’s case, it is unlikely that a balancing strength will be created by accident as well.

Once again it is very difficult to prevent these imbalances by testing all permutations of attacks so we have to take a deterministic approach. So when creating moves that you want balanced, the length of the hit react caused by a given attack should follow this rule of thumb

Attackremainder = Threatattack + Wind Downattack

Attackremainder - Wind Up*target < Hit Reactlength < Attackremainder + Wind Up*attacker

There’s quite a bit of information going on in these equations so I’ll explain each part.

  • Attackremainder - This variable represents the amount of time that remains before the current attack ends
  • Threatattack - The entire length in time of the threat of the current attack
  • Wind Downattack - The entire length in time of the Wind down of the current attack
  • Hit Reactlength - The length in time of the hit react that was caused by the current attack

These next two are where it gets tricky.

  • Wind Up*target - This is not the wind up of the current attack. Instead it is the length in time of the shortest wind up in the target’s move set. The target is the character that is hit reacting as a result of the current attack. If the hit react is not in-sync with this number the target will be able to return to idle initiate the attack with the shortest wind up and land before the attacker finished his wind down.

  • Wind Up*attacker - Here we’re taking the values of multiple wind ups in the attacker’s move set. At a bare minimum this needs to equal the wind up of the current attack. If the length of the hit react does not fall in line with this value then the attacker can simply perform this attack again, and if there isn’t some other factor to prevent the attack from succeeding to land then it can be performed infinitely. If this value is equal to the length in time of the fastest wind up in the attackers move set then the attacker will not be able hit the target a second time before the target returns to idle. If this value is chosen to be between the length of the wind up of current attack and the length of the shortest wind up then the attacker will be able to land a second attack on the target while that target is still hit reacting with any attack that has a wind up shorter than this value. Let me repeat that. The attacker will be able to land a second attack on the target while that target is still hit reacting with any attack that has a wind up shorter than this value.

Here’s an example. Consider the following move set.

Move Name Wind up Threat length/shape Wind down Hit Reaction
Light Punch 100ms 200ms/front 200ms 450ms
Medium Punch 200ms 300ms/front 300ms 750ms
Hard Punch 300ms 400ms/front 500ms 1150ms

If the player started with a Hard Punch the following could happen


Here we have the player start a Hard Punch at t=0. At t=300 the threat of the Hard Punch begins and the target begins to hit react. At t=1200 the hard punch ends, but the target still has 250 milliseconds before his hit react ends and he returns to Idle. If the player were to try and perform another Hard Punch those 250 milliseconds would expire before the attack’s 300 millisecond wind up completed, hence the target could defend against the attack. However, the medium punch has a shorter wind up of 200 milliseconds and in the timeline above the attacker performs a medium punch immediately following his hard punch. So the threat of the medium punch begins at t=1400, 50 milliseconds before the target returns to Idle so he begins to hit react again. At t=2000 the medium punch ends, but the target still has 150 milliseconds before his hit reacts end. Both the medium punch and the hard punch have wind ups that are too long to follow up with. The light punch however is quick enough, so the attacker decides to perform the attack. At t=2100 the threat of the light punch begins and the target begins to hit react for a third time. At t=2500 the light punch ends and the target has 50 milliseconds left before he can return to Idle. This time however, the attacker has no moves in his move set that have a short enough wind up to follow up with, and the target manages to return to Idle at last and the attack phrase or sequence comes to an end. So as long as the hit reacts follow the equation I specified above infinite combos will be avoided and the phrase will eventually come to an end.

<< Prev Home Next >>