Game Development Reference
In-Depth Information
certain sounds. In the case of Thief, it would have been a good idea to cut the volume
of the storm effects so the game clues in the AI dialogue would be crystal clear.
Don
'
t Depend on Dialogue
Dialogue is great to immerse players in game fiction, but you can
t depend
on it 100 percent. If you give critical clues and objectives via dialogue, make
sure that you have some secondary way to record and represent the
objectives, such as a special screen where the player can read a synopsis.
It
'
s too easy for a player to miss something. If your game enables subtitles,
you can provide a screen that shows the last conversation.
'
While we
ve got to take some care when changing the
levels of sound effects. Any discrete jump in volume is jarring. Solve this problem
with a simple fade mechanism:
'
re talking about mixing, you
'
FadeProcess::FadeProcess(
shared_ptr<SoundProcess> sound,
int fadeTime,
int endVolume)
: Process(PROC_INTERPOLATOR)
{
m_Sound = sound;
m_TotalFadeTime = fadeTime;
m_StartVolume = sound->GetVolume();
m_EndVolume = endVolume;
m_ElapsedTime = 0;
VOnUpdate(0);
}
void FadeProcess::VOnUpdate(unsigned long deltaMs)
{
if (!m_bInitialUpdate)
m_ElapsedTime += deltaMilliseconds;
Process::VOnUpdate(deltaMilliseconds);
if (m_Sound->IsDead())
Succeed();
float cooef = (float)m_ElapsedTime / m_TotalFadeTime;
if (cooef>1.0f)
cooef = 1.0f;
 
Search WWH ::




Custom Search