adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Adonthell-devel] Audio module


From: James Nash
Subject: Re: [Adonthell-devel] Audio module
Date: Tue, 24 Aug 2004 19:08:20 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114

Sounds cool!
Some suggestions though....

address@hidden wrote:
Just now I had some thoughts about the audio module for v0.4 that I
would like to share. Mainly, it's all about SFX.

For v0.4 it would be cool to have actual sound effects, like bird
song, waterfalls, etc ...

So I suggest we have something like a sound source that could be
attached to a mapobject. If the player comes near to it or goes away
from it, the sound could change accordingly. (SDL_mixer has some
premade effects for this).

Parameters for a sound source would be its volume. We also need to
define how often it loops, as not all SFX would loop forever. We
should also be able to specify a timeframe after which a sound is
restarted once it has finished looping.

As there will be more sound sources than channels, we need an
algorithm to only activate those that are nearest to the player.


Dunno if this is what you intended, but it would be cool if the sounds gradually fade in as the player gets closer to the object that emits them. Perhaps there could be a parameter for the mapobjects that defines the radius within which you start to hear it. The volume from there until right next to the object could just incremented linearly ( volume = distance from object / sound radius ).


Apart from these sound sources that are tied to map objects or
characters, we'd also have to be able to play sound effects whenever
we want. So I guess we should reserve a number of channels for
ambient sounds and a smaller number for the rest, like doors creaking
or combat noises, etc.

Say if we allow a total number of 16 simultanous channels playing, we
could have 10 for ambient sounds and 6 for the rest, which should be
more than enough.

That sounds good. I guess if there are more than 10 audible mapobjects/characters within range of the player the engine could just figure out which are the 10 closest and discard the rest.


Dunno how hard this would be to do - but I guess there might also be cases when there are multiple objects within range of the player that use the same sound effect. It would be good if the engine could let them share the same channel (basically just playing one instance of the sound effect). Presumably this would free up resources for other sound effects and may avoid problems where the same effect is being played several times but each one not being quite in sync and thus just sound a mess (OTOH there may be other situations where this is just what you want (imagine a crowd of people in a town) so perhaps this feature should be optional.


Also, it would be cool if we could add effects to the sounds (like an echo). Lots of old SNES games had this and it's a nice touch. Perhaps it could be a parameter of the map (or a part of a map) to turn on such effects.


        -James





reply via email to

[Prev in Thread] Current Thread [Next in Thread]