Game Development Community

Implementing 40 different sound fx in one area.

by Jake london · in Torque 3D Professional · 07/24/2011 (9:59 am) · 1 replies

Dear Artists/ prgrammers,

I have stumbled upon a head scracther, I wish to implement 40 diffrent sound FX for a puzzle game users must walk up to and play in Torque 3D. However these sounds are used randomly and do not need to be laoded into the resources. Also this is an online game, therefore only users in the vicinity must hear them. Any ideas on best practices resource wise to implement them.

#1
07/26/2011 (8:57 am)
For the randomness, use an SFXPlayList. The current limit is 16 slots per list but you can either easily cascade lists or just bump up the limit in the code (NUM_SLOTS in sfxPlayList.h).

To use delay-loading, simply make sure that "preload" is false on all SFXProfiles for your sounds so the profile will only load on first use and not straight away. Unfortunately, that only takes care of the loading and won't unload the sound. Ideally, the SFX system should have something along the lines of allowing to flag sounds for unloading if they aren't used in some time.