So here we are again.
Now, I’d like to suggest a philosophy for the dynamic difficulty system
The point is simple: the game tracks all player’s stats.
Here is what’s going on.
Each enemy must have some kind of “level” stat associated with them, where basic zombies are level 0, hulks are almost the highest level and so on. There also must be some kind of normal distribution table which determines what enemies the game spawns as the player develops. The whole thing is based around player level, which is a global variable.
The level can only increase (!) and there are many ways it might increase.
First of all, the game keeps track on player’s inventory. Each item should be tagged as melee weapon, ranged weapon and armor or miscellaneous. Each weapon also has an associated level, for example a pipe would be level 0, knife spear would be level 1, so it goes all the way up to katana. The same goes for armor and ranged weapons.
The game must also determine the type of player’s character, whether it’s a melee build, archer build, unarmed build, firearms build and so on. The type is determined by skills and associated weapon usage. If a character has a lot of melee skill and had used katana a lot in past, the character is considered melee fighter. There must a certain threshold for determining the type since each player has to go through melee stage anyway. Anyways, once the type of character is determined, it cannot be changed unless the new possibility arises and surpasses the older one, so if mentioned character started using a gun, he’d need to make around the same amount of kills as he’d done with katana.
Once the type is determined, the game finds the highest by level respective weapon and throws it into the formula. So for melee build the firearms have no meaning, only melee weapons.
Then the game checks player’s clothing. The formula here is a little big more complicated. The game should determine just how sturdy the player is. The general idea here is that the more body parts are covered by higher level armor, the more advanced the character is.
Artifacts are special items and merely finding them [not even picking up] is already enough to increase the variable.
CBMs and mutations are thrown into the formula as well.
Now are the items. Miscellaneous items are tracked too, however they have no associated levels and the game merely tracks how many items went through player’s hands whether it’s done by moving into the inventory or into a wheelbarrow. This way you keep how many items the player have had throughout the whole session and therefore the game difficulty also increases with this.
Time spent also should play a role here, but no so much.
Now the hardest part: vehicles. The game keeps track of vehicles in player’s possession. In order for a vehicle to become player’s property, it needs to be accelerated by player through controls. Shortly speaking, if a character enters a vehicle, takes control of it and changes its speed - it is deemed working and becomes player’s property. From now on this vehicle is tracked intensively.
Cars are a great way to increase the level and here’s how its done.
First of all, car’s mass plays a huge role. The more massive player’s car is, the more level it created.
Second, you need to keep track of car’s parts. Removing a part doesn’t do anything, but installing a part might level up the vehicle. If a character installs some kind of armor, the car’s level is greatly increased even if it’s just one armor piece. Merely installing something already means the player has access to that part. Now is the most crucial part: the game must track if a car has minifridge, welding rig, chem. set and all that stuff. If ALL of them were installed at some point by the player, the car is considered a mobile base and greatly increases the difficulty.
Finally, cargo space. The more space was used at some point by player, the more level the car gets. So if you once got 1000 cargo space occupied, it will never decrease.
Finally, throwing all that into the final formula, we get the player’s level.
So now what? That level actually determines the chance that a higher level enemy will spawn.
Say, for example, that we have a chance of spawning a basic zombie here. Ok, let’s imagine the player’s level is very high and therefore there is a 25% chance that instead of level 0 basic zombie, they’ll get level 1 acidic zombie. Then we roll again and with 6.25% chance we’ll get level 2 shocker. And even with that there is a 1.5625% chance of spawning some level 3 asshole here.
However, the level can’t increase the probability infinitely, there is a cap. Instead of increasing the probability, it will start to buff enemies’ stats instead.
There you have it.
This way there is no such problem as getting too hard because player is too slow.