Hi guys
I just want to get your opinion on how to control difficulty in my platformer game. This is now when talking about things like amount of enemies, stage time, amount of bonus items etc. I can either hard code the variables in a dedicated file/class or make the difficuilty dynamic by letting a stage number control the variable values like e.g. number of enemies.
So my question is this. How is this handled in pro games? I would prefer to use a hard coded file because it would a) allow me to set exactly the same values if a player re=plays a stage and b)make testing also more efficient, but please let me know according to your experience what is the better route to go, thanks in advance!
enum Difficulty {
EASY = 0,
NORMAL = 1,
HARD = 2
}
private var myDifficulty:smile:ifficulty;
function Start() {
switch(myDifficulty) {
case Difficulty.EASY:
...................
break;
}
}
An example
Thanks for your example wx91, but my question is more a case of opinion rather than how to actually do it in code. Thansk again
I have seen this being done in two ways in pro games: 1) level design, 2) game design.
-
Level design: the difficulty is annotated into the level, and filtered based on difficulty level. The level designer marks certain enemies or locations in the level to be tied to certain difficulty level. For example some enemies could be missing in the easy difficulty, or a location which requires a difficult jump could have an extra platform in the easy difficulty level. Finding correct difficulty is then matter of rigorous play testing.
-
Game design: the difficulty is build into the game design and mechanics, so there are just “few” variables which will control the difficulty of the game. In shooter games you could scale the probability of enemy hitting the player, or scale the enemy hit point count. More complicated example would be something like the AI director in left4dead [1]. The whole pace of the game is controlled by an AI, adding a scaling for difficulty is pretty easy. You could also disable certain enemy actions, for example of a certain enemy has a very hard attack, you could disable it for easy.
Or it could be combination of both. You could have a files describing the player and enemy abilities [2], and choose different one based on the difficulty level, and in addition alter the levels themselves too.
I think one golden design rule for difficulty settings is that the player who played the game in easy, should be able to use what she learned in easy and apply that to harder difficulty levels. Wikipedia has a good page on game balancing [3], not directly applicable but should give you some additional ideas how to approach it.
[1] http://www.valvesoftware.com/publications/2009/ai_systems_of_l4d_mike_booth.pdf (around page 80)
[2] Here’s example of such config files for Crysis: Official Blog for MajorSlackVideos Youtube ChannelCrysis Cheats - How to Tweak Your Config Files - PC Game Cheats
[3] Game balance - Wikipedia
Thanks MM
Some very valid points you have there. I think your golden rule is key though. The player should learn as they progress through the game. It is quite obvious that AAA games has a very set way of distributing enemies through stages. E.g. if you play a level over and over, the enemies are placed in EXACTLY the same spot each time for that level. This is something that has bugged me for a while in gaming now. Should it be done like that, because it causes the player to follow a mechanical path to complete a stage. And what I find interresting is that ALL of them follow this pattern, Crisis, Hitman, BF, you can name them, it is the same all over.
Making levels random so that there is still design and story intent and playability constraint are satisfied (i.e. some items are in right order so that progress is not blocked) is actually pretty complicated problem.
If you’re interested, this article gives good overview how that can be done, though.
thanks for the links, very good reading