HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Fmod - Event loading and unloading.  (Read 2201 times)

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
[Resolved] Fmod - Event loading and unloading.
« on: Oct 02, 12, 12:23:05 PM »

Are fmod events unloaded during area changes even with seamless linking? I notice I have to set max playback to a enormous amounts depending on how many instances of it I have placed.
What Im mainly asking is, if I'm going to be placing say 100 emitters of this one sound through say 5 linked areas do I need to set max playbacks to 100, or just max playbacks possible in 1 area?
I noticed if I set to 1 only one emitter will trigger even if its on the other side of the map even if Im out of range. If Im understanding this correctly then all audio is loaded up and running no matter the range?
« Last Edit: Oct 31, 12, 04:28:39 PM by HE-Cooper »
Logged

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: Fmod - Event loading and unloading.
« Reply #1 on: Oct 18, 12, 09:43:52 AM »

Yes, FMOD events are unloaded on area transition. Truthfully, we need to provide a more top level setting for flagging sound events as "transferable across borders", but it's low priority at the moment.
Logged

Lunchbox

  • World Owners
  • ****
  • Posts: 136
    • View Profile
    • BrandNGames
Re: Fmod - Event loading and unloading.
« Reply #2 on: Oct 18, 12, 12:21:05 PM »

Ah okay, ya I noticed sounds would transfer through areas tied seamlessly. For now Ill just have to design the area linking around that I guess so I dont overlap them, and design the max playbacks for that for now.
Logged

jcsmith562

  • General Accounts
  • *
  • Posts: 190
    • View Profile
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #3 on: Nov 06, 14, 03:21:54 AM »

It would be great if we could see this make it in way in game at some point. It's pretty noticeable when the music cuts when you go across a seam. Though in most cases of other sounds you may want that to be the case.
Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #4 on: Nov 06, 14, 06:28:32 AM »

Can things like music be made to fade out as a player approaches a seam?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #5 on: Nov 06, 14, 06:53:08 PM »

Can things like music be made to fade out as a player approaches a seam?

Yes and no. Mostly no, if you build a 3d sound and expand it to cover 99% of your area with the effect and that 1% lays on your seam lines then yes. But it's by no means clean or effective.

The bigger problem is with looping aspects where the loops change as well when crossing. Would almost like to see a system where a speaker object is attached to the player then controlled by triggers. So the client manages the sound playing, when a trigger such as crossing a seam happens, it triggers event, that can then be used by coders to determine what happens. So maybe takes input of area1 and area2. Then allows for comparisons to determine if it continues to play, drops etc. But since the music is locked to the player and independently controlled, it allows for lots of cool aspects, even when just dealing with background music.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #6 on: Jan 26, 15, 09:27:16 AM »

If anyone digs up this thread, after asking the engineers about this again recently it was noted if you put the sound on a prop bucket that is not destroyed while zoning it can persist (code is in BaseClient). After changing the prop bucket and alterning the HE_ routines on BaseClient we were able to have the music persist properly.
Logged
Co-Owner/Programmer - The Repopulation

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #7 on: Jan 26, 15, 09:01:58 PM »

thanks for the follow up info on this, and yeah good idea on the prop-bucket.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: [Resolved] Fmod - Event loading and unloading.
« Reply #8 on: Jan 27, 15, 07:16:32 PM »

If anyone digs up this thread, after asking the engineers about this again recently it was noted if you put the sound on a prop bucket that is not destroyed while zoning it can persist (code is in BaseClient). After changing the prop bucket and alterning the HE_ routines on BaseClient we were able to have the music persist properly.

I see now what you mean. In the past I have tried used the $Sound system node to play a music track (and that system node uses a prop bucket), only to find that the sound was still killed when moving non-seamlessly.  Now I see that by default $BASECLIENT will call RemoveInstancesFromPropBucket() on all known buckets when _Area_Unload() is called.

So what was needed was to define the method HE_persistPropBucketInstancesBetweenAreaLoads() in the override class of the $BASECLIENT node and in that method specify the "SOUND" bucket to persist.

Then, of course, being careful to manually clean up sounds when done with them.

Thanks, Josh.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.