Useful Tools for Making Video Games - fmod (2008)

9

Click here to load reader

Transcript of Useful Tools for Making Video Games - fmod (2008)

Page 1: Useful Tools for Making Video Games - fmod (2008)

1

Useful Tools for Making Video Games

Part IVAn overview of

Page 2: Useful Tools for Making Video Games - fmod (2008)

2

FeaturesBuilt-in DSP effectsPS3, Xbox 360, Wii, PS2, PSP, Xbox, Gamecube, Windows, Linux, Mac OS supportSound designer tools (FMOD Designer)3D soundThousands of sounds at onceMulti-speaker supportSupports over 20 file formatsC++, C#, Visual Basic API…

Page 3: Useful Tools for Making Video Games - fmod (2008)

3

FMOD Hot GamesGuitar Hero IIIBioShockStrangleholdMetroid Prime 3Heavenly SwordCall of Duty 4CrysisStarCraft II, World of Warcraft…

Page 4: Useful Tools for Making Video Games - fmod (2008)

4

Startup Sequence// create systemFMOD::System* system;FMOD_RESULT result = FMOD::System_Create(&system);

// set speaker mode, 3D settings, configuration options etc. // …

// load soundFMOD::Sound* sound;result = system->createSound(“sound.mp3",…, &sound);

// play soundFMOD::Channel* channel = 0;result = system->playSound(…, sound, …, &channel);

// release resourcesResult = sound->release();Result = system->release();

Page 5: Useful Tools for Making Video Games - fmod (2008)

5

Configuration optionsif you desire behaviour differing from the default such as:

System::setOutput(FMOD_OUTPUTTYPE_[AUTODETECT/XBOX/XBOX360/PS2/PS3/PSP/WII/…])

System::set3DSettings(float dopplerscale, float distancefactor, float rolloffscale)

System::setHardwareChannels : specify min number of hardware channels before falling to software

System::setSpeakerMode : Surround, 5.1, 7.1 etc…

Page 6: Useful Tools for Making Video Games - fmod (2008)

6

ChannelsA channel is an instance of a sound. You can play a sound many times at once, and each time you get a new channel handle.

Channels can be grouped eg:FMOD::Channel *channels[NUM_CHANNELS];FMOD::ChannelGroup *group;result = system->createChannelGroup("Group", &group);result = channel[i]->setChannelGroup(group); // i:0..NUM_CHANNELSresult = groupA->setVolume(…);group->setMute(…); // etc.

Page 7: Useful Tools for Making Video Games - fmod (2008)

7

3D SoundFMOD_RESULT result =

fmodSystem->set3DListenerAttributes(int listener,const FMOD_VECTOR* pos, const FMOD_VECTOR * vel,

const FMOD_VECTOR * forward, const FMOD_VECTOR *up); Pos: Address of a variable that receives the position of the listener in world space.Vel: Address of a variable that receives the velocity of the listener. Forward: unit length and perpendicular to the up vector. upUpdate these vectors every so many milliseconds, not every frame, since frame rate can vary.

Page 8: Useful Tools for Making Video Games - fmod (2008)

8

EffectsCan create chains of digital sound processing effects by adding existing filters one after the other eg:

FMOD::DSP* dspDistortion = 0;FMOD_RESULT result =

system->createDSPByType(FMOD_DSP_TYPE_LOWPASS,&dspDistortion );

result = system->addDSP(dspDistortion);

DSP types: FMOD_DSP_[CHORUS/COMPRESSOR/DISTORTION/ECHO/FLANGE/NORMALIZE/PITCHSHIFT/REVERB/…]

Page 9: Useful Tools for Making Video Games - fmod (2008)

9

Referenceswww.fmod.org