Very simply, we need more control over sounds, and I think it's high time it was all unified into one place.
Sounds are called in various places by Spring. Some of it is nearly perfect now. Some of it... er... not so perfect.
The sound code for weapons? It's nearly perfect. Volume control over distance works just wonderfully, once you know what you're doing.
Sound code for unit acknowledgements and other stuff? Not so great. It's globally controlled, has a global volume, and either drowns out everything else all the time, or is hard to hear.
Sound code that is working from the play-sound COB event? Well, it works, but control over distance is mysterious at best- we have one out've two variables with the weapon sounds to play with. This one thing, all by itself prevents us from having things like units that actually generate sounds during motion. I'd love to have turrets whine, feet stomp, hydraulics hiss, hear ammunition belts metalically slither as weapons reload... hear soldiers randomly say stuff to each other, (Unit One, running RestoreAfterDelay: "hey, did we get 'em all?" - Unit Two sights enemy, starts aimscript, "Look out! Here they come!") etc., etc., etc.
Good sound adds a LOT to a game's feel. I'd really like to increase the immersion factor for sound, but I lack the tools to do so.
What I think we need, frankly, is to have a section of Resources.tdf that deals with sounds and their parameters, and have all other things that can call sounds be directed back there... and from there, to the sound part of the engine. It's just like where we're going with bitmap data, and I think it would be awesome to go there with sound, and finally start moving away from the OTA-esque simplistic world of simple sound FX called by very discrete events.
How would this work? Well... you'd list all the sounds you'd use in your mod, just like all the bitmaps. Then you'd give them parameters, just like the parameters we can pass to sounds in Weapon files. Lastly, just like with bitmaps, you could call the same sound, give it two different aliases, and then call it in different contexts, using the different parameters for different things.
For example, you might have a very short, sharp "bang" that makes a great gun noise, and you want it to be loud and play over a long distance. But you might want to re-use that sound, and play it simultaneously, at a low volume and low distance, with some other sound, just to sharpen the tones a bit if people are close enough to the source- making the mixed sound have a bit of complex chunkiness to it, like real sounds do. The possibilities are nearly endless.
Doing things this way would have a lot of advantages. Sounds in COB scripts, and the sounds in the Interface code, could use the same aliases and parameters, which would probably be far more efficient than the current code.
And eventually, if we can move to a model for Features where they can execute a script, we could have things like ambient sounds by area, allowing us to do things like rushing water over a stream (with FX being called to suggest rapid water movement I swear I'm gonna keep saying that Features need to be able to execute COB scripts until somebody unifies them with Units and kills two birds with one stone) music loops being played at random over a city's lifeless streets, burning volcanoes putting out a pulsing, nearly-subsonic roar, etc...
Sound. Long.
Moderator: Moderators
This is why I find it odd that Spring does not use openAL...I don't really know much about all this programming humdingery, but from what I've read, openAL is very simple to implement in a program that already uses openGL, and actually does 3d positional effects, sound distancing and such properly.
To add to Argh's auditory lamentations, I've always wanted to hear a "whoooosh" as a projectile passes across the screen (apart from just a launch noise).
edit: supported by a quote lolz!
To add to Argh's auditory lamentations, I've always wanted to hear a "whoooosh" as a projectile passes across the screen (apart from just a launch noise).
edit: supported by a quote lolz!
wikipedia wrote: The net result of all of this for the end user is that in a properly written OpenAL application, sounds behave quite naturally as the user moves through the three-dimensional space of the virtual world. From a programmers perspective, very little additional work is required to make this happen in an existing OpenGL-based 3D graphical application.
Last edited by Peet on 04 Dec 2006, 05:50, edited 1 time in total.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
a question:
I was playing Company of Heroes recently, and i noticed that if a unit says something when they are on screen it sounds normal, but if they're not on screen they sound like they are speaking through a radio. it would be simple enough to get that effect on the sound, but do they use two different sounds or have a filter applied to the sound in game (as part of the direct x sound or whatever)? Which ever way it must have some way of telling when a unit is on/off screen. obviously with spring where you can zoom out all the way, there would be a certain level of zoom which would count as 'off screen'
Will it be possible to do this in the next release?
EDIT: it would also be nice to have built in reverb/echo filters which depended on a variable to do with the units location (which i suppose could be built into the map), that way all the sounds that get put into the game wont have to have effects pre applied which could make them useable in a wider range of situations
I was playing Company of Heroes recently, and i noticed that if a unit says something when they are on screen it sounds normal, but if they're not on screen they sound like they are speaking through a radio. it would be simple enough to get that effect on the sound, but do they use two different sounds or have a filter applied to the sound in game (as part of the direct x sound or whatever)? Which ever way it must have some way of telling when a unit is on/off screen. obviously with spring where you can zoom out all the way, there would be a certain level of zoom which would count as 'off screen'
Will it be possible to do this in the next release?
EDIT: it would also be nice to have built in reverb/echo filters which depended on a variable to do with the units location (which i suppose could be built into the map), that way all the sounds that get put into the game wont have to have effects pre applied which could make them useable in a wider range of situations