Forum

Background music?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Background music?

Postby Stealth Kill » Sat Jan 13, 2007 9:45 am

Hi HOw can I add Background music ingame and Menu?
Stealth Kill
 
Posts: 83
Joined: Fri Dec 29, 2006 12:34 pm

Postby Boss429 » Sun Jan 14, 2007 7:15 pm

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...
Boss429
 
Posts: 39
Joined: Sun Dec 03, 2006 7:29 pm

Postby CocoT » Sun Jan 14, 2007 10:23 pm

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

Postby redrum » Tue Jul 31, 2007 3:23 am

where can I get .ogg files?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
User avatar
redrum
 
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Postby scar3crow » Tue Jul 31, 2007 5:19 am

redrum - you can encode them from a variety of sources using cdex or other programs.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Sajt » Tue Jul 31, 2007 5:57 am

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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Spike » Tue Jul 31, 2007 6:52 pm

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

Postby redrum » Sat Aug 04, 2007 4:49 pm

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

Postby scar3crow » Sat Aug 04, 2007 4:51 pm

that should be track02.ogg I believe

I don't know what engines support this besides DP however.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby Sajt » Sat Aug 04, 2007 5:26 pm

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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby leileilol » Sun Aug 05, 2007 7:18 am

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


fteqw
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest