<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="pattern.xsl" ?>
<?DOCTYPE pattern SYSTEM "plml.1.00.dtd"?>
<pattern patternID="closed_captions" xmlns:html="http://www.w3.org/1999/xhtml">

<name>Closed Captions</name>
<author>Eelke Folmer</author>

<problem>
<usability>
Game presents feedback in the form of audio but, the player:  
<html:li>cannot hear it because the player is playing in a noisy environment</html:li><html:li>does not want to hear audio (prefers listening to music).</html:li><html:li>cannot understand what is being said (slang words or jargon).</html:li>
</usability>
<accessibility>
The player suffers from an auditory disability which prevents the player from hearing audio or only limited. 
</accessibility>
</problem>

<principle>Adapting to the Player/ replacing stimuli</principle>

<forces>
<force>
Feedback in the form of audio may be essential for playing certain games.
</force>
<force>
Hearing impaired cannot hear audio cues and an alternative needs to be provided. 
</force>
<force>
Too much visual feedback may overwhelm a player.
</force>
</forces>

<context>
Any game that presents audio feedback e.g. in cut-scenes, dialogue, hints in the form of audio such as speech, music, ambient sounds like explosions or gunfire. Audio plays a significant role next to visual cues it is an important indicator to the player - especially with  ambient sounds like gunfire that something is happening e.g. enemies attacking. 
</context>

<pattlet>Provide Closed captioning</pattlet>

<solution>Translate all audio feedback (except music) into a visual feedback (e.g a caption). For dialogs this can be done in the form of subtitles. Ambient sounds in the game (such as gunfire) can be displayed by texts in the screen which indicate what type of sound is being heard e.g *metallic clunk* or *footsteps*, *distant gunfire*. To distinguish between different sources of audio one can consider using color codes. To mimic 3D sound, positional information can be added; e.g. one can display captions in different parts of the screen indicating the direction the sound comes from. An alternative would be to use a sound radar where whenever a sound is being played a dot lights up on the radar indicating the positional source of the audio. A limited number of captions may need to be displayed at the same time to prevent the screen from becoming to cluttered, when many sounds are being played at the same time. Captions can also prioritized depending on importance.
</solution>

<implementation>
<html:IMG src="images/CC_classdiagram.png" align="left"/>
Implementation - Implementing a closed captioning component in a game engine is fairly easy. Your audio component needs to modified such th￼at whenever a sound or music is being played it sends a message to the CC component indicating the name of the sound and positional information. The CC component then looks up the caption for the sound file and displays a text in the game’s GUI. Usually a GUI widget with an empty caption placeholder can be used to display the caption. Positional information can be used to shape the widget so it can display positional information e.g. the widget could be a radar or the widget can display the caption at specific locations in the screen. Take a look at the source code of our Closed caption component for the Torque engine if you want more implementation details.
</implementation>

<rationale>
 Accessibility - Visual feedback in the form of text is an essential requirement for deaf players; without closed captioning they cannot play the game as they miss out on auditory clues and feedback required to play most games.  Usability - Closed captions may increase user satisfaction as the game adapts to the player when the player cannot or does not want to listen to the game audio.. 
</rationale>

<example><html:IMG src="images/hl2-subtitles.jpg" align="left"/>
<html:b>Half life 2 - </html:b>This first person shooter has closed captions. </example>



<example><html:IMG src="images/torque_CC.png" align="left"/>
<html:b> Torque CC - </html:b>  A component for the Torque engine which adds closed captions using four different implementations (just caption, coded caption, positional caption and sound radar).
</example>

<example><html:IMG src="images/doomcc2.gif" align="left"/>
<html:b>Doom 3 - </html:b> A modification of the popular first person shooter Doom 3 which adds closed captions.
</example>

<references>
</references>

<literature>
</literature>

<architecture-implications>
</architecture-implications>

</pattern>
