<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="pattern.xsl" ?>
<?DOCTYPE pattern SYSTEM "plml.1.00.dtd"?>
<pattern patternID="dynamic_difficulty_adjustment" xmlns:html="http://www.w3.org/1999/xhtml">

<name>Dynamic Difficulty Adjustment</name>
<author>Eelke Folmer</author>

<problem>
<usability>
Player gets killed or injured repeatedly because the game is too hard to play for the player on the current difficulty setting.
</usability>

<usability>
Player gets bored because the game is too easy to play for the player on the current difficulty setting.
</usability>

<accessibility>
A disability prevents a player to respond precisely or timely.
</accessibility>
</problem>


<forces>
<force>The game should be challenging but players do not want to try getting past a point in the game over and over again.</force>
<force>If players cannot go past a point in the game they may abandon playing the game.</force>
<force>Players have varying skill sets yet games usually only accomodate a limited number of difficulty levels.</force>
<force>Making the game harder or easier to play in an obtrusive way may put the player off.</force>
</forces>

<context>
To cater for different types of players, games usually offer a fixed number of difficulty levels. Common terms for difficulty levels are easy, normal and hard. Difficulty levels most commonly affect in game variables such as amount of health or damage that a particular weapon does. Depending on the difficulty level the game becomes harder or easier as: 
<html:ul>
<html:li>The enemies are stronger or weaker</html:li><html:li>Weapons do more or less damage</html:li><html:li>The player is stronger or weaker</html:li></html:ul>
What exactly is modified when a particular difficulty level is chosen at the start of a new game very much depends on the type of game. E.g a first person shooter could have the enemies be weaker and the weapons do more damage for an easy level, but for a real time strategy game the player could start out with more units available on an easier level. The player has to choose a particular difficulty level when playing a new game and it is often impossible to switch to a different difficulty level without having to start over. 
</context>

<pattlet>Adjust the difficulty level to the player's performance</pattlet>

<solution>
Rather than have the player stick to a fixed level which may be too easy or too hard for the player, make the game automatically adapt the difficulty level to the player's performance. 
There are two implementations for this pattern:<html:ul>
<html:li>Suggest switching to a different difficulty level based on the player's perfomance. If the player has failed or been killed a number of times, show a popup that suggests switching to an easier level. This could also be implemented the other way around. If the player has not died for a certain amount of time a popup can be shown suggesting to move to a harder level. This solution has to be carefully balanced as not to frustrate the player. When the player has a hard time beating an enemy a suggestion to move to an easier level could aggrevate the player. If the player refuses to move to an easier level for a few times this pattern should be disabled. Alternatively the player should be able to choose an easier or harder level through the options.  
</html:li>
<html:li>Automatically adjust the difficulty level based on the player's performance. Every time the player dies or fails or plays well for a while, there is a chance that the player will switch to the next easiest/ harder difficulty level. This pattern should be completely transparant to the player hence there is no need to communicate a particular difficulty level. As a result a large number of difficulty levels can be implemented, which can cater to a larger number of players rather than having only 3 fixed levels (easy/medium/hard). No difficulty level has been chosen when starting playing the game. The first level needs to accurately determine the level of the player. 
</html:li>
</html:ul>
</solution>



<rationale>
<usability>
Automatically adjusting the difficulty of the game may avoid the player getting stuck at difficult stages and ensure a players progress throughout the game which increases satisfaction and efficiency. Certain parts in the game may be too hard or too easy because of level design and this pattern may mitigate some of these differences in difficulty making the game more balanced. 
</usability>
<accessibility>
A disabled player may be unable to play the game on even the easiest level. A game using this pattern may have difficulty levels that go below the easy level and make the game playable to them. 
</accessibility>
</rationale>

<example><html:IMG src="images/godofwar-adjustingdifficultylevel.jpg" align="left"/>
<html:b>God of War -  </html:b>This 3rd person action game suggests adjusting the difficulty level, if the player dies frequently in a short period of time, a screen is presented which offers the option to switch to an easier difficulty level.</example>

<example><html:IMG src="images/sin-dynamicdifficulty.jpg" align="left"/>
<html:b>Sin Episodes - </html:b> This first person shooter offers a very advanced dynamic difficulty system. It continuously monitors performance and will tailor enemies health ammo, armor and damage to a specific playing style.  
</example>

<example><html:IMG src="images/residentevil-dynamicdifficulty.jpg" align="left"/>
<html:b>Resident Evil 4 -</html:b>This 3rd person shooter has 5 levels of difficulty. It automatically adjusts the difficulty level based on the player's performance. 
</example>

</pattern>
