After finding out that the progression system wasn’t very good, I decided to remove the premise of keeping the game length fixed, and instead focused on expanding the amount of time spent “on the zone” (the green area in the previous post’s graph).
This led to the development of a more defined adaptive difficulty algorithm.
What we want to do, is to set a specific set of enemies (in quantity and type) for a specific player performance.
To make this abstraction easier to manipulate, we can add a number representing the “difficulty factor” in the middle. This divides the problem in two:
* Determining the difficulty factor for a given player performance.
* Determining the amount and type of enemies for a given difficulty factor.
We can actually divide the player performance in two different fields: defense and attack.
Defense is given by the amount of hits the player receives during a period of time, plus his ability to grab health power-ups.
Attack could be given by the amount of successful shots, during the same period of time. The problem is that it depends on the amount of enemies, and their initial health values. It isn’t hard to hit the same enemy 4 times in a row, but if at the lowest difficulties the enemies die from a single shot and there are fewer enemies, it will be harder to get a high attack value, so this isn’t representative of the player skills in higher difficulties. The problem then, seems to be that we can’t predict how the player will perform with harder enemies, by looking at his performance with easier ones. I’m still thinking if there is a way to calculate the attacking performance.
Enemies for a given difficulty:
The premise is that at the lowest possible difficulty the game will be full of Papas, and at the hardest one it will be full of Pupas. The fun part comes at determining the distribution in between.
In the previous post, I made a distinction between follower and non-follower enemies. This is because even although Pepa (follower) can be easier to kill than Popa (non-follower) with some practice, it is easier to handle 10 Popas hanging around the map, than 10 Pepas following you around.
Therefore, I decided that the ratio of follower ships should increase exponentially towards the hardest difficulties, which basically means that you will get a lot less of follower ships during the lower part of the difficulty spectrum than by using a linear distribution. Having this division in place, I managed the rest of the distributions depending on the intrinsic enemy difficulties.
If you are curious, this is the final graph I ended up with:
|X Axis: Difficulty. Y Axis: Enemy density.
The graph shows the enemy distribution for a certain difficulty. For example, if you want to know the percentage of each kind of enemy at 0.5 difficulty, you can trace a vertical line at 0.5 in the x axis. That will give you, that for example, the probability of a Pupa spawning is close to none.
After some play-testing with different people, I can say that the system does its purpose. I seen people who played constantly around the 0.2-0.3 difficulty spectrum, while some others managed to stay in the 0.7-0.8, and others in between. The point is that even although they all had different skill levels, they all played for more than 5 minutes straight without dieing, but at the edge of it.
This introduced two new problems: the game getting repetitive, and the sessions being potentially infinite in length.
These are the problems I’m currently tackling, and probably what my next post will be about.
It looks like something new always pops up, and this is what makes game development fun!
See you around!