Alone - Balance - Anatomy of an Enemy


Howdy,

So this week I'm still working on testing and balancing combat. So let's take this opportunity to look under the hood at how this all works. Specifically where Enemies come from.

When a boy enemy and a girl enemy love each other very much...

Joking aside, the first thing we do when we have to generate enemies, is to determine which level they're going to be generated at. Most of the code which generates enemies does them in batches - room by room in the case of crypts, or tower by tower in the case of islands. At that point the generator tries to hit a target level being the sum of those which it generates. There's some other code there to prevent ending up with a small army of low-level mobs - which would be surprisingly difficult to fight.

After that, it needs to decide which stats the enemy gets. All enemies which are the same level start off with the same base stats (accuracy, damage, defence, that sort of thing). That mapping betwixt levels and stats is similar to those which the player gets, except they're a bit less. This way, a player fighting an enemy of their level is likely to win, and is likely to have enough health left over that they can continue their adventure.

After that, it's time to generate the equipment. This is where the differences start to appear.

Each type of enemy has a specific list of equipment, which are broken down into tiers. The lower tier being stone and leather, and the higher tiers being the various metals equipment can be made of. Which tier equipment is chosen from depends on the level the enemy generated is at - but after that, they're free to mix and match any items in that tier.

This has three implications - firstly, enemies which share the same level can have a wildly different feel to them - some might be harder, some might be glass cannons. Secondly, enemies carry this information very clearly - if you're fighting something clad in plate armour, you can be pretty sure they're going to survive a couple of hits. Thirdly, the difference between tiers is more pronounced.

Equipment being such an important factor, the difference between a Lv 20 and 25 enemy (same tier) is very different to that between 25 and 30.

Note the enemies in this tier - despite all having difference equipment and weapons, they all look "easy" enough, even without the level displayed.
These look significantly harder. And they are.

Given how islands and other progression is going to be broken up by tier, this should hopefully have a smooth, and obvious line which shows your character's limits. At some point in time hitting enemies with stone weapons just won't do it - and it's time to progress to copper weapons, which would be available around that time.

So that's it for this week, next week it's more of the same - still testing and balancing.

Til then.

Get Alone

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.