Background music?

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
Stealth Kill
Posts: 83
Joined: Fri Dec 29, 2006 12:34 pm

Background music?

Post by Stealth Kill »

Hi HOw can I add Background music ingame and Menu?
Boss429
Posts: 39
Joined: Sun Dec 03, 2006 7:29 pm
Contact:

Post by Boss429 »

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...
CocoT
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum
Contact:

Post by CocoT »

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? :P). 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.
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Post by redrum »

where can I get .ogg files?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

redrum - you can encode them from a variety of sources using cdex or other programs.
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

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.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

Yeah... just don't change cd tracks too often... clients have a tendancy to freeze up a bit when you change cd track. :P
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.
redrum
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Post by redrum »

I tried creating the folder cdtracks in the sounds folder and placed 02.ogg in it. It didn't work.
I'm using QW. Should it have worked?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
scar3crow
InsideQC Staff
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Post by scar3crow »

that should be track02.ogg I believe

I don't know what engines support this besides DP however.
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

sound/cdtracks/track002.ogg

I always get it wrong too
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.
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Post by leileilol »

scar3crow wrote:I don't know what engines support this besides DP however.
fteqw
Post Reply