Inside3D!
     

Background music?

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Sat Jan 13, 2007 9:45 am    Post subject: Background music? Reply with quote

Hi HOw can I add Background music ingame and Menu?
Back to top
View user's profile Send private message
Boss429



Joined: 03 Dec 2006
Posts: 22

PostPosted: Sun Jan 14, 2007 7:15 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message Visit poster's website
CocoT



Joined: 14 Dec 2004
Posts: 599
Location: Belly-Gum

PostPosted: Sun Jan 14, 2007 10:23 pm    Post subject: Reply with quote

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? Razz). 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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Tue Jul 31, 2007 3:23 am    Post subject: Reply with quote

where can I get .ogg files?
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Tue Jul 31, 2007 5:19 am    Post subject: Reply with quote

redrum - you can encode them from a variety of sources using cdex or other programs.
Back to top
View user's profile Send private message AIM Address
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Tue Jul 31, 2007 5:57 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Jul 31, 2007 6:52 pm    Post subject: Reply with quote

Yeah... just don't change cd tracks too often... clients have a tendancy to freeze up a bit when you change cd track. Razz
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.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
redrum



Joined: 28 Mar 2007
Posts: 367
Location: Long Island, New York

PostPosted: Sat Aug 04, 2007 4:49 pm    Post subject: Reply with quote

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 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
scar3crow
Inside3D Staff


Joined: 18 Jan 2005
Posts: 837
Location: Las Vegas, NV

PostPosted: Sat Aug 04, 2007 4:51 pm    Post subject: Reply with quote

that should be track02.ogg I believe

I don't know what engines support this besides DP however.
Back to top
View user's profile Send private message AIM Address
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Sat Aug 04, 2007 5:26 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sun Aug 05, 2007 7:18 am    Post subject: Reply with quote

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


fteqw
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group