Game Development Reference
In-Depth Information
like the SoundEngine to manage playback and control of your
sounds, SoundMixer is a nice fallback if you are loading in con-
tent created by someone else and you need to control any rogue
sounds.
FLASH HACK: THE SOUND OF SILENCE
At a conference I once heard a Flash cartoonist reveal a secret for how he
made sure that Flash could keep up with the set frame rate and slow
down on older machines. Although it applied to Flash 5, I
ve found it can
still help in a pinch today. Basically, he would put a clip on the main
timeline that had a one-second sound with total silence in it, set to
stream, and loop it 9 or 10 times. The way Flash is designed to work is
that it will skip rendering frames in order to keep in sync with streaming
sounds on the timeline. It will, however, continue to process frame
scripts, meaning that any scripts that are reliant on the frame rate will still
run. In essence, it may make gameplay choppier on slow computers, but
it will play at the correct speed. The reason he looped it a number of
times is that each time a streaming sound restarts the Flash player will
stutter momentarily if the processor is maxed out. The clip will play
straight through and only have to restart the stream every 10 seconds or
so. At this rate, it is barely noticeable and makes a huge impact on the
playability of complex games. Because the sound is made up of silence,
you can use the highest compression settings possible that would turn
any other sounds to utter garbage, and it won
'
'
t make a difference. It
'
won
t add more than a few kilobytes to your end file and is worth the
peace of mind that the game will, at least, keep up on older machines.
The bottom line to remember with sounds is to not to forget
them. There is almost no game experience that cannot be enhanced
by a well-implemented soundtrack. Make audio a priority, and your
game will be stronger as a result.
Search Nedrilad ::




Custom Search