Alex Kisil's Blog

Retroactively balancing enemies in DREAMWILLOW

Feb 21, 2020

In this post, I explore how we could have taken a more computational approach to balancing our enemies in the recent WolverineSoft Studio release, DREAMWILLOW.

One of my biggest regrets on DREAMWILLOW was waiting too long to begin balancing the various systems in the game. Level design was pushed off until the last second, and because of it, we didn't notice some glaring issues. As the lead designer on the enemies pod, I played a large role in the frantic balancing process that followed--which essentially consisted of several consecutive days of playtesting and tweaking. By this point, we had five different enemies in the game, and not much of a baseline to start off of.

Looking back on it, I think we ended up in an okay place with the progression of difficulty in our game (despite the feedback loop that the AI companions posed). However, after the game's completion and a month or so to ruminate, I sought out to try and find a better, more systematic approach to balancing enemies in our future games (or at least provide a good baseline when starting the process).

Constructing a Formula

After some great advice from the wonderful Jordan Ajlouni, I tried to break the enemies down into their numerical components, and construct a formula to "score" their difficulty. I was met with surprising difficulty in trying to find good references for character balancing formulas online, but what I did find was an RPG monster level calculator (along with a list of stats it takes into account) and the damage calculation formula used in the mainline Pokemon games--good enough for me.

The monster level calculator--while not a directly applicable to our twinstick shooter--gave me a sense of what kind of variables I should be taking into account (swapping out stats like elemental attributes for more applicable ones, like hitbox sizes). From the Pokemon damage formula, I was able to gather a decent format for factoring those variables in: big fraction with additive properties multiplied on top and subtractive ones multiplied on the bottom.



I've found it's nearly impossible to describe all of the nuance of a real-time enemy encounter through numbers alone, so I added a complexity factor "x" to account for the somewhat subjective complexity of dealing with certain enemies. For example, the ghoul has a high complexity factor because its firing rate varies over time, making it difficult to predict.

Once I was happy with the formula, I added in a constant "z" to normalize all of the scores around an intuitive range. To derive the constant, I plugged in all the values for the goop bird enemy and set its score to 5. This would ensure that (as long as I didn't let any stats grossly outweigh the others) the rest of the enemies would score somewhere around 5 as well. I chose 5 for the goop bird specifically because I felt that it was a good baseline, medium-difficulty enemy.

Results and Conclusion

Plugging the values into the formula on a google spreadsheet yielded a decent spread ranging from 0-10, a satisfyingly sweet range for easy comprehension. Furthermore, the algorithm's ranking of the enemies turned out to be almost exactly how we ended up ranking them through our trial-and-error balancing method, huzzah! The only difference is that we tended to treat ghouls as slightly more challenging than goop birds, while the algorithm states they should be absolute pushovers compared to the rest of the cast. This tells us that the formula probably places too much emphasis on movement speed (ghouls are stationary enemies) and maybe not enough emphasis on being a projectile-user enemy. That said, we also often put ghouls in spots around levels that gave them a bit of a tactical advantage--like across bodies of water or on the back ranks of hordes of other enemies. To account for this, I can continue to up the complexity factor until the ghoul fits where I think it should, but then the formula begins to lose its meaning as it quickly shifts from being an objective, numerical predictor to a thinly veiled subjective contest with my bias running the show.

What I've learned from this is that the formula and spreadsheet method is an extremely quick and simple way of finding a solid baseline for balancing enemies (or any system for that matter) in a game. Sure, the rankings it spit out weren't exactly what we landed on in the end--but they were pretty darn close. If we had started our balancing process with the rankings the aglorithm gave us, we would have saved a ton of time and effort and been able to tweak things to a much finer grain.

If you've read this far, thanks so much! I hope you enjoyed it. You can check out DREAMWILLOW here; the project is really special to me and I'm super proud of it.

Alex Kisil

Feel free to contact me at any time! Email is the best way to get in touch with me quickly.

Ann Arbor, MI 48105

alex@alexkisil.com

+1 (586) 321-6151

Jimmy

This is Jimmy. Jimmy loves you.