[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: Soundtrack rough draft
On 05.03.2004 06:11, Dave Fancella wrote:
> > I was going to add some code to support multiple tracks when I realized
> > that we now have two somewhat contradicting ideas on the table:
> >
> > a) provide one (or more) default tracks and allow scenarios to override
> > them with their own, or
> >
> > b) the adaptive approach you outlined above which requires specially
> > tailored code and makes custom tracks for individual maps rather difficult.
>
> a) This is simple because it's just a matter of making a new track for each
> scenario and letting the game just find it, falling back to a default if it's
> there.
>
> b) More complicated, but not necessarily mutually exclusive. This would
> require a certain amount of metadata for each track. So, for example, I'd
> have three files, called "boring.ogg", "movingalong.ogg", and "faster.ogg".
> Then I'd have a text file that defined them like this: (I love xml)
>
> <intro src="boring.ogg" />
> <exciting range="1-4" file="boring.ogg" />
> <exciting range="5-8" file="movingalong.ogg" />
> <exciting range="9-10" file="faster.ogg" />
> <outro src="boring.ogg" />
>
> So the game would determine that the game is currently as exciting as 5 Vegas
> showgirls, so it would scan through its list of tracks for '5' and find that
> 'movingalong.ogg' is the only one it has, so it plays it. When it's done
> playing that one, it rechecks and determines the game is now as exciting as 9
> Vegas showgirls. Again, it only has one file to play for this, so it plays
> 'faster.ogg'.
Ok, b) would not exactly be mutually exclusive but it would raise the barrier
for soundtrack contributions considerably. With regard to the implementation,
how would the game determine when to switch from "boring" to "movingalong"?
When the excitement level rises to 5, of course, but how does it figure out the
beat on which to switch? It's not reasonable to assume that the tracks fit
together at every given moment, right? Do we need a waveform analyzer?
Jens