Jump to content
The Dark Mod Forums

Sfx Overlap Problem


Ishtvan

Recommended Posts

I'm trying to get the SFX for an objective to be played, but it seems like only one thing can play "globally" at once, even though it might look like it's on two different channels because it's on two different entities. This means that if the ambient music is playing globally, and the "objective complete" sound cuts in, it will cut off the ambient music (and possibly leave it off).

 

Does this make sense? Maybe one way around this would just be to play the sound on the player, set the falloff settings such that it maintains constant volume within the distance from your feet to your ears (your origin is your feet so that's where the sound will play) and set it to omnidirectional (so it's not global, but it will seem that way).

Link to comment
Share on other sites

That sounds like the best solution to me, especially if (as we were talking about in another thread) the player needs to hear the "objective completed" sound while still hearing the background music. If it were left as a global and got cut off that would be an abrupt interruption in the ambient sounds.

 

It's a shame that the engine is limited like that, but thinking about it from a programmer's point of view I guess it makes sense. The global should only be whatever is in that world or map at the time and the local sounds would be played for local events. The "objective complete" or "objective failed" sounds shouldn't affect the rest of the world, only the player. Whereas, the ambient sounds are part of the global world.

 

Okay, I had to put my object oriented hat on for that one!

"Without music to decorate it, time is just a bunch of boring production deadlines or dates by which bills must be paid."- Frank Zappa

Link to comment
Share on other sites

Wait, we only have one global sound channel? This is bad. We can't make smooth transitions between two areas with global ambients like that! Or am I missing something?

 

Whereas, the ambient sounds are part of the global world.

That would be SFX, no? I always called sounds not created by the environment as ambient.

Link to comment
Share on other sites

Yeah I'm not sure how we could crossfade the ambients. We can still make physically placed sounds omnidirectional, and could conceivably have two ambient-spheres overlapping to crossfade. But the geometry is pretty restricted to that.

 

I could be wrong about this, I was just basing it on Dram's library map with an ambient, and I had put in the start mission sound to play on a globally on the worldspawn, but as soon as the ambient kicked in it cut off the start sound. There may be a way for mappers to set up ambients so they don't hog the channel, I'm not sure.

 

"Global" is just supposed to be a flag anyway, just meaning that the volume never falls off. It's not supposed to be a channel and I would have expected multiple globals to be able to play. It could be that something else is happening in that map example.

Link to comment
Share on other sites

There are some open source libraries for doing that, so we might be able to create it on the fly. But then, we don't have the source for the sound engine, so I'm not sure how we could do that when a sounds is in the middle of playing.

Gerhard

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...