Earlier this year, I posted about the balancing act involved in designing a game. In that post I mainly talked about the process of balancing weapons and damage output, but of course that’s one of many aspects that may need balancing in a game. For example, alongside damage output would be stat values and distributions, which directly influence how much damage each character takes. As a result, balancing “offensive aspects” such as damage output goes hand in hand with more “defensive aspects” such as the defense stat, hit points, and so on.
But a third factor comes into this process, namely, experience points and level. These impact how rapidly the player’s stats increase as the game continues – in other words, the rate of stat growth rather than the stat values themselves. This in turn impacts a whole heap of other aspects of the game, one example being how much easier it becomes to defeat enemies in earlier areas with each level up. Conversely, the difficulty of defeating stronger enemies is also affected, and so experience growth also has to be balanced against enemy levels in subsequent areas (and vice versa).
So, how do you balance EXP?
That’s a good question.
If you Google something like “experience points formula”, you’ll see a whole heap of strategies and formulae – but which one is best? That’s the million dollar question, and it’s a difficult one to answer conclusively.
I remember reading somewhere on the internet (I couldn’t find the link unfortunately) which pointed out that, when it comes to balancing stats and experience requirements, there are no right or wrong answers – only different ones. I’m not sure I totally agree, especially in cases when the “solution” has a seriously detrimental impact on gameplay. But the point, I think, is that there are many potential, good solutions to these problems, depending on what you’re trying to achieve, and that no single solution is the be-all and end-all.
So, here’s a quick overview of some of the strategies on offer which you could use.
These are used by games such as Pokémon Go, and are a fairly neat and intuitive solution. The idea is that at each level, the game looks up how much experience the player needs to advance to the next level. Often these values are nice easy numbers, such as multiples of 100 or 1000, making it easy for the player to keep track of their progress towards the next level-up. However, by the very nature of lookup tables, these experience requirements have to be specified for each and every level the player could be at. That could lead to problems further down the track, when it emerges that the experience requirements do need to be re-balanced for whatever reason, meaning that the developer would have to (carefully!) consider and possibly change each and every value in the lookup table.
Formulae, on the other hand, are easy to implement and maintain over time, and can be as simple or as complex as you need them to be. Some common examples might be linear, polynomial, or exponential functions used to make the experience requirement increase steadily with each level-up. However, things can sometimes get out of hand, for example in the main-series Pokémon games in which long and complicated formulae seem to be used for everything, including experience and growth. Such formulae may help the developer to very precisely fine-tune the player’s experience, but it can also make things more difficult later when you have to re-balance things (“How does this formula work again?).
On that note, a word of advice: yes, it can be tempting to have a really complicated and awe-inspiring formula for calculating these things. But also remember that at the end of the day, the player will probably never see your super-complex formula for calculating experience – but they will notice the effect on gameplay if the formula doesn’t work well in practice. (Sometimes, simpler really is better!)
One strategy I tried in one of my very, very early games was a “continuous experience” approach. Here I ditched the idea of player level completely and had a single experience value, which was used to continuously update stats. While it’s an interesting idea, I decided against it for Ambience, simply because I found it made it too hard for the player to keep track of their progress. For example, stats would have to increase continuously as well (being recalculated from the experience value), leaving the player wondering “how powerful am I now?” at every turn. Also, when experience levels get really large (into the thousands), it becomes much more difficult to think about a four or five-digit experience value as a metric for progress, compared to a single or double digit level.
Oh well – it’s still an interesting idea. Perhaps I’ll play with it a little more in some future project…?
I’m going with the formula approach for both the player’s experience requirements and the amount of experience that enemies yield. In particular, I used an exponential function for the experience requirements, compared to a linear function for experience yield. This is because exponential functions always grow faster than linear or polynomial functions, meaning that as the player grew stronger, they would have to defeat more enemies to level up.
The experience requirement formula itself has undergone several iterations over the past six months or so, as seen in the graph below. The Alpha Demo, here called version 7.1, used a very rapidly growing exponential function which made it very difficult to level up past level 15. I changed the form of the exponential in subsequent versions. The curve in version 8, dating back to a few months ago, didn’t quite grow fast enough, and so the player leveled up too quickly making the game too easy.
So I tweaked the formula slightly to grow a little faster, giving the version 9 formula, which is the current version. Of course, I could have also gone through and changed the enemy levels in each area to make them suit the player’s rapid growth a little better – but tweaking a single formula is a lot easier than changing enemy levels in ten different places!
One final strategy…
There are, of course, ways of tweaking difficulty without messing with experience formulae.
There are some circumstances where I’d like the player to still be challenged, no matter how strong they are – for example, some of the prison escapes. To that end, I’ve decided to tweak the enemy generation script such that in some areas, the levels of spawned enemies aren’t static, but increase with the player’s level. It’s not something that seems to be used in many other games (as far as I know), but I’ve found it works fairly well in Ambience to keep the game reasonably challenging.