• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Dynamic difficulty settings?

Status
Not open for further replies.
Level 18
Joined
Feb 19, 2009
Messages
802
This is less a technical question and more of a general game design one.

If you're like me, you hate it when video games have harder difficulty levels and all that changes is the health/attack of the enemies. I want more out of my maps when I add difficulty settings.

So what's a good way to really spice up the different levels? And how should you make them work with triggers/variables? Bonus abilities for units? Extra enemies? Research levels reduced/increased?
 
Level 5
Joined
Jan 16, 2016
Messages
109
I think adding passive abilities like critical strike or smth like that would greatly increase the difficulty. So i would choose bonus abilities for units :)
 
Level 12
Joined
May 22, 2015
Messages
1,051
Critical hit chance is basically just % increased damage.

IMO, unless you can make the AI better at punishing player's mistakes, there's not really a super nice way to do it. Adding more units is not very different from just adding stats, and it may run into problems with performance if you make too many of them.

Adding brand new units might also be annoying because it is almost like it's a different game.

Anyway, I had this idea for my map that I like. Instead of labelling the hardest difficulty as "Extreme" or "Insane" or "Apocalypse" or something, the hardest difficulty will merely be called "Normal". The difficulties in my map will be:
"Beginner" - Less bosses to choose from (there are multiple bosses that can spawn each round, so to keep it simple, I will only choose from a smaller list of more simple / teach the basics bosses). Heroes will deal double damage and receive half damage.
"Easy" - Same thing as beginner, except heroes will take normal damage and deal normal damage.
"Peasy" - The name is more of a joke / placeholder for now. I don't know if I want to include this one or not, but it would be the same thing as "Easy", except with much more of the bosses added.
"Normal" - All of the bosses and everything is as normal.

I also plan to add a short cinematic to the "Beginner" difficulty. IMO, I'd rather people be challenged by the game "normally". It is not meant to be easy because it is a coop map (it's a hero defense), and I don't think coop / single player games should be easy (or else I find them boring). If your map is too easy on "normal", I recommend making it harder, and adding more "easy" difficulties to hold the players' hands a little bit until they are ready.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I've always wanted a game were higher difficulty = better AI. Not in resources or health, but just an AI that plays better.

My friend had a really neat idea for this kind of thing. Basically, you would have some main loop for the AI that runs every X seconds. It would inform the AI what to do, and then the AI would do something. The idea is to lower X for higher difficulties since the AI would then react well to more and more things.

The main issue is still just making a good AI. I think it is easiest / best to start with a really good AI, and then slowly dumb them down for lower difficulties (such as increasing the main loop interval).
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
So what's a good way to really spice up the different levels?
In one word? AI
uhm... actually those are two words, Auto Increment.
Or was it Artificial Intelligence?

Increasing stats is basically a balance in strength, not difficulty.
It is not harder to fight a boss that you just have to fight twice as long... in simple words.
However, when you play with more players in a co-op vs AI game for example, you have to compensate for their combined strength ofcourse.
In that case, improving unit stats is good.

Adding abilities may be part of both. For most active abilities, you increase difficulty, while most passive abilities are for strength balance.

My friend had a really neat idea for this kind of thing. Basically, you would have some main loop for the AI that runs every X seconds.
To finish the story:
When he finally finished it, he realized that it didnt really change the difficulty of the AI, just the reaction time.

It is kind of bad to do such a thing, not only will it look stupid, but it also doesnt really change the difficulty.
What you want an AI to improve in is his building positions, (mixed) unit training, attacking neutrals to gain experience, buy stronger items, attack more important units, better ability aiming/using more abilities, etc.

The main issue is still just making a good AI. I think it is easiest / best to start with a really good AI, and then slowly dumb them down for lower difficulties (such as increasing the main loop interval).
I think its easier to do the other way around :D
When you start making an AI, you will then get new ideas how to improve it, so the one that you make after that would probably be better.
It is called "improving development skills" ;)
 
Level 11
Joined
Aug 24, 2012
Messages
429
A middle ground and the path that I use the most is adding more that the player must keep track off. Not more of the same thing (eg. just double the amount of units) but more different things.

For example in a Harder difficulty I would merely throw a few 2-3 light melee units at the player base every 5 minutes. The trick is that those units have Stealth and can attack while Stealthed, so you must keep some detection in your base.

Or I would give permanent Immolation to some basic units, so that you need to think how to tackle them. Some units would get a powerful AOE attack that must be dodged. Some units would gain powerful AOE heals and those must be focused down before the rest of the army.

You could argue that this just increases the strength of the mission, and you would most likely be right. But I think it's more interesting than just adding more units and resources for the AI.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
So what's a good way to really spice up the different levels? And how should you make them work with triggers/variables? Bonus abilities for units? Extra enemies? Research levels reduced/increased?
Take a page from Blizzard's design approach to difficulty by looking at the StarCraft II campaigns and cooperative missions. They are a perfect example of how difficulty should be implemented. Diablo III Set Dungeons are also a good example since they are the only part of Diablo III that actually requires some skill.

Higher difficulties start to throw in more powerful units. For example in a melee based maps the heroes you face might have access to their AoE moves like Blizzard or Flamestrike as well as their ultimate abilites like Inferno and Starfall.

At higher difficulties the enemies have access to more upgrades. Low difficulties might max the AI out at tier 1 upgrades and not research some specific unit enhancements until very late game. At high difficulties the AI will over time progress to tier 3 upgrades and can even start out with specific unit enhancements already researched.

At higher difficulties objectives become harder. This can come in the form of them needing more to complete (eg more units needing to be killed for a kill units objective) or that to complete them becomes harder (eg Amon's void crystals spawn more obelisks and spawn them faster).

Higher difficulties can apply a handicap to you. For example you start out with fewer units (need to build that barracks now) or less resources (1 less mineral patch on Brutal in SC2 coop). At lower difficulties you might start out with more units to make things easier (you start with a huge army and 2 barracks).

New challenges might arise at higher difficulties not present in low difficulties. There might be a new unit sort (Leviathans appearing in Hard+ in coop mode in SC2) or new attack patterns to challenge the player (eg early rush to defend against). At low difficulties there might not be any such surprises to worry about.

Higher difficulties might also have more strict objectives. For example one could change from a relatively easy objective like "use impale 150 times" to "chain impale without missing on 20 different targets 5 times".

Ultimately it comes down to what is "skill" in your map. Harder difficulties should require advanced gameplay techniques which require practice to perform and might not even be possible by some players. For example players might need to micro their armies from AoE moves, are forced to take the "hard route" or are penalized for failing to perform an action properly (not moving out the way of the slow moving boulder is now fatal instead of just heavy damage).
 
Level 12
Joined
May 22, 2015
Messages
1,051
In one word? AI
uhm... actually those are two words, Auto Increment.
Or was it Artificial Intelligence?

Increasing stats is basically a balance in strength, not difficulty.
It is not harder to fight a boss that you just have to fight twice as long... in simple words.
However, when you play with more players in a co-op vs AI game for example, you have to compensate for their combined strength ofcourse.
In that case, improving unit stats is good.

Adding abilities may be part of both. For most active abilities, you increase difficulty, while most passive abilities are for strength balance.


To finish the story:
When he finally finished it, he realized that it didnt really change the difficulty of the AI, just the reaction time.

It is kind of bad to do such a thing, not only will it look stupid, but it also doesnt really change the difficulty.
What you want an AI to improve in is his building positions, (mixed) unit training, attacking neutrals to gain experience, buy stronger items, attack more important units, better ability aiming/using more abilities, etc.


I think its easier to do the other way around :D
When you start making an AI, you will then get new ideas how to improve it, so the one that you make after that would probably be better.
It is called "improving development skills" ;)

Well it really depends on the kind of AI you are making (as in, what kind of game the AI needs to play). Building positions and setting up different unit mixes is RTS-only. Most WC3 maps aren't even normal RTS games.

"Reducing reaction time" WILL make it easier. Maybe it doesn't make as much sense in the context of an RTS (because they might keep really strong build orders for all difficulties), but it makes sense as a whole. There is this term called a perception-action cycle (PAC) and it is something that all learning players improve at in any given game (that requires good decision making). Basically, it is the amount of time it takes someone to perceive the game state, decide what to do, and then do it. Better players will basically always have smaller PACs (and this makes sense because they know more about what's happening at any given moment, so they will make good decisions faster and probably will also execute them more accurately). Lowering the frequency of the AI actions would mimic lower level players who are still learning.

Reaction time from AI is basically always instantaneous (which looks bad on its own). It would be interesting to try to make an AI that sees only the game state ~0.2 seconds ago (typical human reaction time). That's another topic though.

As for the building of the AI, all I really wanted to state is that you shouldn't focus on 5 AIs - one for each of 5 difficulties. You should focus on making one good AI and do your best to make it as good as possible. Add in some checks for AI level and have it ignore some parts of your AI decision making. Perhaps add random values to "threat level" checks so that the AI sometimes makes an "error" in judgement. There's lots you can do, but just don't go and make an easy AI, and then try to make a normal AI afterwards. Just try to make a good AI and figure out what parts of your AI can be adjusted to modify difficulty level as you go.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I should have known... a post by DSG has got "StarCraft II" in the first sentence.
And I should have known a post by Wietlol would be off topic... This is not very constructive posting we are doing?

StarCraft II is quite relevant as an example in this case. It is a professionally designed game which shows off well designed features such as difficulty. Playing the campaign at Brutal will make you sweat compared with playing at normal. Many people struggle with/cannot pass some missions on Brutal.

Lowering the frequency of the AI actions would mimic lower level players who are still learning.
Which is what StarCraft II does. Lower difficulty AI has a lower APM setting. Cheating usually has APM maxed out, which is a big factor in why sessions with such AI offer suffer from performance difficulties.

Reaction time from AI is basically always instantaneous (which looks bad on its own). It would be interesting to try to make an AI that sees only the game state ~0.2 seconds ago (typical human reaction time). That's another topic though.
It is actually not instant. It has limits that can some times result in delays. It certainly can be faster than humans though, especially since humans have to face network latency when playing multiplayer while AI do not since they are synchronized with the game.


As for the building of the AI, all I really wanted to state is that you shouldn't focus on 5 AIs - one for each of 5 difficulties. You should focus on making one good AI and do your best to make it as good as possible. Add in some checks for AI level and have it ignore some parts of your AI decision making. Perhaps add random values to "threat level" checks so that the AI sometimes makes an "error" in judgement. There's lots you can do, but just don't go and make an easy AI, and then try to make a normal AI afterwards. Just try to make a good AI and figure out what parts of your AI can be adjusted to modify difficulty level as you go.
That is not really possible. AI are not truly intelligent so instead you are hard-coding into them a lot of gameplay related information that usually takes players a long time to learn. At lower difficulties you will often be forced to purposely program in "wrong" information so that they are easier for players to fight.

A good example is StarCraft II melee AI and its build orders. At beginner mode they have a very basic and stupid build order to purposely keep them with newbie players who have no build order idea. At expert mode and cheating they have professional level build orders programmed into them so that their progress and army compositions closely reflects someone playing with a high skill level. High level AI will try to counter play armies and does pick one of many different strategies, where as low level AI picks quite predictable strategies so as to not challenge the player.

When you are hardcoding such differences into the AI you might as well be writing a separate AI for each difficulty for maintainability. If you change the AI of one difficulty, you can then be sure it will not make the others harder or easier unintentionally.
 
Level 12
Joined
May 22, 2015
Messages
1,051
That is not really possible. AI are not truly intelligent so instead you are hard-coding into them a lot of gameplay related information that usually takes players a long time to learn. At lower difficulties you will often be forced to purposely program in "wrong" information so that they are easier for players to fight.

A good example is StarCraft II melee AI and its build orders. At beginner mode they have a very basic and stupid build order to purposely keep them with newbie players who have no build order idea. At expert mode and cheating they have professional level build orders programmed into them so that their progress and army compositions closely reflects someone playing with a high skill level. High level AI will try to counter play armies and does pick one of many different strategies, where as low level AI picks quite predictable strategies so as to not challenge the player.

When you are hardcoding such differences into the AI you might as well be writing a separate AI for each difficulty for maintainability. If you change the AI of one difficulty, you can then be sure it will not make the others harder or easier unintentionally.

Again, your example is an RTS where all players start on the same grounds (starting workers etc). Just give the AI some kind of decision making numbers that they work with, and then scramble them for lower difficulties to have some questionable decisions (what buildings to make, what items to buy, whether they should fight or retreat). Add that in with overall slower rate of deciding what to do and that is essentially what low level players are doing.

It's fine if your easiest AI can beat a player as long as your game makes sense enough that they can figure it out.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Just give the AI some kind of decision making numbers that they work with, and then scramble them for lower difficulties to have some questionable decisions (what buildings to make, what items to buy, whether they should fight or retreat). Add that in with overall slower rate of deciding what to do and that is essentially what low level players are doing.
Except the AI is not actually making decisions as far as what it does, that is far too complicated to happen in real time at the required scale. Instead it follows pre-programed build sequences, which it decides from a high level which to use based on high level decisions (how much air am I up against). Even if it chose the wrong composition it would still be more than enough to bulldoze any newbie since it only makes a difference at high level play. As soon as you start to put in "newbie" build sequences for it to select then you might as well make a separate AI per difficulty.

It's fine if your easiest AI can beat a player as long as your game makes sense enough that they can figure it out.
No it is not fine when that happens. You will have thousands of messages coming in about how "bloody impossible" your game is insulting you followed by terrible reviews because the people who review games suck at playing them. This is what is happening with set dungeons in Diablo III because they actually require some skill to complete.

Easy should be what it says on the tin, it is easy. You would need to purposely go out the way to lose on easy. Hard should also be hard. You will need to re-try hard mode many times to pass it, even if you can effortlessly do lower difficulties.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Except the AI is not actually making decisions as far as what it does, that is far too complicated to happen in real time at the required scale. Instead it follows pre-programed build sequences, which it decides from a high level which to use based on high level decisions (how much air am I up against). Even if it chose the wrong composition it would still be more than enough to bulldoze any newbie since it only makes a difference at high level play. As soon as you start to put in "newbie" build sequences for it to select then you might as well make a separate AI per difficulty.

Well you'd modify the AI's decision making in more than one place. I am not suggesting you just make them build the wrong units. Just spending all your money in any RTS is enough to roflstomp most people on the planet.

No it is not fine when that happens. You will have thousands of messages coming in about how "bloody impossible" your game is insulting you followed by terrible reviews because the people who review games suck at playing them. This is what is happening with set dungeons in Diablo III because they actually require some skill to complete.

Easy should be what it says on the tin, it is easy. You would need to purposely go out the way to lose on easy. Hard should also be hard. You will need to re-try hard mode many times to pass it, even if you can effortlessly do lower difficulties.

I'll think this over. In any case, I am certain is not hard to make an even worse AI. Making an AI that plays well (but also within the same rules as the human player) is where the real challenge comes as a developer. You could tack on one beginner level of difficulty at the end if you needed to since programming a bad AI is a lot less work than a good one (that isn't just cheating).
 
Level 7
Joined
Nov 19, 2015
Messages
283
Not sure if already mentioned. I read about someone using spawn tentacle as a spell AI. You can add to higher levels or also decrease the interval where the hero has to move to avoid the damage.
 
Status
Not open for further replies.
Top