Tremulous Forum

Media => Mapping Center => Topic started by: trigger_david on September 17, 2007, 10:01:15 pm

Title: Repost: Programmers!
Post by: trigger_david on September 17, 2007, 10:01:15 pm
Hi, everyone.

I made a post over at ioquake3 requesting programmer assistance with something, but then I realized that I'm probably better off asking around to increase my chances of finding someone, so here goes...

The post:

http://www.chatbear.com/unity2/6079/843,1190039936,1714/1056679?v=flatold

Feel free to reply here! The gist of my request is that I'm looking for the means to control (.ogg) music playback via an in-level trigger. Just something that, when triggered, would send the music music/example cvar to the console, or even just a new generic cvar trigger (preferable).

I'm also very open to suggestions. Further details in the above post, including my background and intentions, if at all interested.

Thank you for reading!

David K.
Title: Repost: Programmers!
Post by: kevlarman on September 18, 2007, 03:30:28 am
letting a map trigger execute any client command is a a huge security hole, however there are already triggers to play music in quake3, and if ogg support is compiled in (tremulous doesn't and from talking to timbo it doesn't look like it ever will (unless microsoft decides to package libvorbis for some reason)) then you can play an ogg file.
anyway, moved to mapping questions so someone who knows more about it than me can tell you how to set up a target_speaker to play to the whole map.
Title: Repost: Programmers!
Post by: trigger_david on September 18, 2007, 04:14:18 am
Hey there, and thanks for the reply!

Quote from: "kevlarman"
letting a map trigger execute any client command is a a huge security hole


Absolutely. But, this is a single player experience, so that wouldn't present an issue in this case.

Quote from: "kevlarman"
however there are already triggers to play music in quake3, and if ogg support is compiled in (tremulous doesn't and from talking to timbo it doesn't look like it ever will (unless microsoft decides to package libvorbis for some reason)) then you can play an ogg file.


When you say there's already triggers to play music, were you referring to target_speakers (which you mention below), or is there another music trigger I'm not aware of?

I tried the .ogg support in Open Arena and it seemed to work fine, for my needs anyway. However, it appears that .ogg is only supported for music, and not target_speakers (which are currently limited to 8-bit, 11khz, mono files, which aren't suitable for music.) Also, even with the "global" spawnflag set on target_speakers, I couldn't get it to truly play globally like the actual level music does, and it also seemed directional instead of being omni (eg. turning my head to the right of the sound  results in only being able to hear it from the left). But, I'm willing to bet it might be a .def file issue in GTKRadiant 1.4, as I've already seen another error already (the "up" and "down" angles are reversed for func_doors.)

Just to be sure, though... are you saying that if the .ogg support was enabled, .ogg could be used for target_speakers as well as music, instead of the default .wav format? If so, that's very exciting to hear. What is the issue exactly with it being disabled, if I may ask?

Thanks again!

David K.
Title: Repost: Programmers!
Post by: Taiyo.uk on September 18, 2007, 04:55:31 am
target_speaker entities can use 22.05 and 44.1kHz .wav files too.

Quote from: "GtkRadiant"
-------- SPAWNFLAGS --------
LOOPED_ON: sound will loop and initially start on in level (will toggle on/off when triggered).

LOOPED_OFF: sound will loop and initially start off in level (will toggle on/off when triggered).

GLOBAL: sound will play full volume throughout the level.

ACTIVATOR: sound will play only for the player that activated the target.
Title: Repost: Programmers!
Post by: kevlarman on September 18, 2007, 05:13:35 am
Quote from: "trigger_david"

Just to be sure, though... are you saying that if the .ogg support was enabled, .ogg could be used for target_speakers as well as music, instead of the default .wav format? If so, that's very exciting to hear. What is the issue exactly with it being disabled, if I may ask?

Thanks again!

David K.
ogg support requires libvorbis, which timbo doesn't want to package for windows. tremulous doesn't have single player right now, and probably won't for a long time (if it ever does) so you really should be asking the people related to the game you're mapping for (or the ioq3 forums if you're making your own game...).
Title: Repost: Programmers!
Post by: trigger_david on September 18, 2007, 06:03:57 am
Hi!

Quote from: "Taiyo.uk"
target_speaker entities can use 22.05 and 44.1kHz .wav files too.


Really? Is there a switch I need to make to enable this? I created various versions of a test.wav, and only the 8-bit/11khz/mono files worked. For anything higher the engine just complained that it couldn't open it for some reason. I'll definitely try again, it's possible I overlooked something. Also, can target_speakers use stereo .wavs? If not, I won't be able to use them for music.

Concerning the Global spawnflag: Yes, the description states it should play at full volume throughout the level, but it just wasn't my experience when I set it (which is why I mentioned it might be an error in the way the spawnflag was set up in the GTKRadiant entities.def file.) I'll have to look up what the numerical value of that spawnflag is so I can correct that .def file, if that's the case.

Thanks for the reply!

David K.
Title: Repost: Programmers!
Post by: trigger_david on September 18, 2007, 06:12:40 am
Quote
ogg support requires libvorbis, which timbo doesn't want to package for windows. tremulous doesn't have single player right now, and probably won't for a long time (if it ever does)


I see. Fair enough.

Quote
so you really should be asking the people related to the game you're mapping for (or the ioq3 forums if you're making your own game...).


This is my own creation. And I posted to the ioq3 forums, there just hasn't been any replies yet. I linked the original lengthy ioq3 post here to increase my chances of finding someone out there who might be interested/able to help, especially since I don't program myself. And also because, sadly, there aren't that many Q3 programmers around it seems. It's such a great engine, too, wish more people were still making use of it.

Thanks again for the reply.

David K.