Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Background music?

| Inside3d Forums Forum Index -> Engine Programming

View previous topic :: View next topic
Author | Message
--- | ---
Stealth Kill Joined: 29 Dec 2006 Posts: 83 |

Posted: Sat Jan 13, 2007 9:45 am Post subject: Background music? |

Hi HOw can I add Background music ingame and Menu?

Back to top |

Boss429 Joined: 03 Dec 2006 Posts: 22 |

Posted: Sun Jan 14, 2007 7:15 pm Post subject: |

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 |

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

Posted: Sun Jan 14, 2007 10:23 pm Post subject: |

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.

Back to top |

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

Posted: Tue Jul 31, 2007 3:23 am Post subject: |

where can I get .ogg files? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

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

Posted: Tue Jul 31, 2007 5:19 am Post subject: |

redrum - you can encode them from a variety of sources using cdex or other programs.

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Tue Jul 31, 2007 5:57 am Post subject: |

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 |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Tue Jul 31, 2007 6:52 pm Post subject: |

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.
_________________
What's a signature?

Back to top |

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

Posted: Sat Aug 04, 2007 4:49 pm Post subject: |

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 |

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

Posted: Sat Aug 04, 2007 4:51 pm Post subject: |

that should be track02.ogg I believe I don't know what engines support this besides DP however.

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Sat Aug 04, 2007 5:26 pm Post subject: |

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 |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sun Aug 05, 2007 7:18 am Post subject: |

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

fteqw

Back to top |

Display posts from previous:

| 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