Feature Creep / Entity Associated (automatic) fade in/out sound zones

Author
Message
Sparrowhawk
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 12th Apr 2011
Location: Planet Magrathea
Posted: 16th Jan 2015 14:45
I would be good if a sound file could be associated with an entity (currently possible in the Sound0 and Sound1 field), but assigned a radius range, so that the sound was faded in and looped when the player got close to that entity.

This would allow entities such as a generator or a waterfall to have their default sound associated with them, and the play as the player got nearer/fade in.
The sound zone system is fine for some things, but if you have a lot of 'noisy' entities such as motors/engines etc., they are very poor, as for each entity you have to set up a sound zone, and I've not been able to reliably get sound zones to fadein out depending on distance.

This would be really useful especially for environmental entities such as trees, which could have a low leaf rustling noise when the player was within say 200 units., its all these things that add to the realism of the level, and to manually add 50 sound zones for trees, 20 for waterfalls, etc., etc., certainly isn't the most efficient way to do this.

All it would require would be the sound to play put in the 'sound' properties field, and a 'sound range' property which could fade the sound in as soon as the player was in the range.

Thoughts?

Custom Mac Pro (2014): OSX 10.10 (Yosemite) and Windows 8.1 Pro:

Octa-threaded Xeon E5 v2 @ 3.7Ghz [9775]; Dual AMD FirePro D500 (3GB VRAM Each) [3769]; 12GB RAM [2517]; 512GB SSD [9074];
Gtox
3D Media Maker
9
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 16th Jan 2015 15:24
Good idea.
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Jan 2015 18:43 Edited at: 16th Jan 2015 18:53
You could script this no problem already just by using the get player distance. Using the get player distance actually is a radial distance from the object/entity. Just set the distance you want. You can have it reference sound0, sound1, or even directly reference audio from the audiobank by name and path.



Below is an example of sound fade-in and fade-out and transitioning:





i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Sparrowhawk
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 12th Apr 2011
Location: Planet Magrathea
Posted: 16th Jan 2015 21:25
I knew there was a script, however I could never get it to work, though that was bac in v.1.08 so may have just been bugged out. Still it would be beneficial to have it built in for entites that already have a custom script, say doors.
Also simplifies it for non-scripters, and if specified in the entity it avoids the script throwing errors that lock the engine (which I have encountered with script).

Custom Mac Pro (2014): OSX 10.10 (Yosemite) and Windows 8.1 Pro:

Octa-threaded Xeon E5 v2 @ 3.7Ghz [9775]; Dual AMD FirePro D500 (3GB VRAM Each) [3769]; 12GB RAM [2517]; 512GB SSD [9074];
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 16th Jan 2015 23:09 Edited at: 16th Jan 2015 23:25
Yeah basically what's needed is better SoundInZone scripts from TGC. Ones that fade out and in properly based on distance. Because even with what seems built-in in most cases they use are actually scripts. For instance soundinzone.lua.

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT
Sparrowhawk
GameGuru TGC Backer
13
Years of Service
User Offline
Joined: 12th Apr 2011
Location: Planet Magrathea
Posted: 16th Jan 2015 23:31
Yeah, one of the current flaws with the music system in the video above is (as far as I'm aware?) the support for only a couple of sounds to play at once? I could be wrong here, last time I did any work with sound zones I was having the whole zone deleting issue, and haven't really done much Zone stuff since. Whereas entities like waterfalls and trees, etc., would want a sound that always played when approached, but not one that overrode all other sounds.

It would be good to simply have the entity properties specify, and the engine deal with the script behind the scenes, so it didn't have to be worried about. Much simpler to add to the entity doc "sound2 = waterfall", "soundrange = 200" and then have Reloaded actually do the fading etc., at that range. I think variable atmospheres would add a lot to the games, more so than a general atmosphere track.

Custom Mac Pro (2014): OSX 10.10 (Yosemite) and Windows 8.1 Pro:

Octa-threaded Xeon E5 v2 @ 3.7Ghz [9775]; Dual AMD FirePro D500 (3GB VRAM Each) [3769]; 12GB RAM [2517]; 512GB SSD [9074];

Login to post a reply

Server time is: 2024-05-02 19:29:51
Your offset time is: 2024-05-02 19:29:51