Background music?
-
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
Background music?
Hi HOw can I add Background music ingame and Menu?
In DarkPlaces it is quite easy to get music working the way Quake played CD tracks. What I mean by that is Quake played one track per level and the map somehow determined what song to play. Anyways here's how to do it:
Grab some OGG's and name them track##.ogg (where the "##" is put a number; starting with "02")
Put the OGG's in id1\sound\cdtracks\
Then load up e1m1 for example and the music will play.
But it will only repeat the same song over and over untill you complete the level...
Grab some OGG's and name them track##.ogg (where the "##" is put a number; starting with "02")
Put the OGG's in id1\sound\cdtracks\
Then load up e1m1 for example and the music will play.
But it will only repeat the same song over and over untill you complete the level...
Is there a track for the menu though? (when there is no demo running, for example)...If not, it sounds like it could be neat to add a special reference to it into DP (trackmenu.ogg or something). That and maybe a track for when the console is pulled down (trackconsole.ogg? ). My PaQman engine used to have those, but it's rotting under the sea with dead fishes by now.
Of course one of the problems would be that the level track would probably have to start from the beginning once you took the console off. Unless there is a little time tracker that memorized the position, but I don't know if that's feasible.
Of course one of the problems would be that the level track would probably have to start from the beginning once you took the console off. Unless there is a little time tracker that memorized the position, but I don't know if that's feasible.
Which track to play is determined by the 'sounds' field in the worldspawn entity of the map. Though QuakeC has the power to change CD tracks on the fly (for example, when the intermission starts there is QuakeC code to start track 2, I think). QuakeC does this with, I think it's called SVC_CDTRACK. You can even play different tracks to different clients, if you're evile.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Yeah... just don't change cd tracks too often... clients have a tendancy to freeze up a bit when you change cd track.
Not a problem with the dp fake track things. oggs rule!
(using cdtrack stuffcmds as a weapon is fun!)
oggenc is a free commandline program which can create oggs from other types of files (including wav). alternativly if you're crazy you can use .wav files as fake cd tracks too.
Not a problem with the dp fake track things. oggs rule!
(using cdtrack stuffcmds as a weapon is fun!)
oggenc is a free commandline program which can create oggs from other types of files (including wav). alternativly if you're crazy you can use .wav files as fake cd tracks too.