Multiple Events' Automation

Hi! I’m trying to create a system in FMOD Studio to filter some of the sounds in our multiplayer game. In our situation, we have players Indoors and Outdoors. The players are using the same events. (like footsteps, punches etc.). If a player is hearing a sound, the player must decide if the sound coming from inside or outside (When the player is Indoors he must hear the outdoor sounds muffled and attenuated).

My problem is the routing. Let’s say we have a character who is running in a house and there is another character who is listening outdoors. The player outdoors must hear a muffled sound and the player inside must hear a different sound. The only solution I can see here is to double all the events (indoor and outdoor versions) Route them to different returns and use different snapshots (Snapshots for the players indoors and outdoors). This one works but it doesn’t seem efficient. Doubling the events part looked expensive. Is that true? Is there an easier way to do that? Thanks!

Is this a splitscreen multiplayer game where all players are using the same device, or a network multiplayer game where each player is using a different device?

It is an online game. Each player connect from different devices

In a network multiplayer game, each player’s device runs a separate instance of the game, which includes its own instance of the FMOD Engine, its own copy of the game state, and (crucially) the position in the game world of the player using that specific device.

There is no need to have multiple routing paths for multiple players, because there is only one player using each instance of the game. This means that you can just use that player’s position for all purposes. The fact that each player’s instance of the game is communicating with other instances of the game is irrelevant; there is no need to handle the sounds heard by other players, because those sounds will be handled by those other players’ devices.

2 Likes

I don’t understand if it is a solution to our situation.

Here is my first fail: I have a mage outdoor and another indoor and a fireball sound. I am sending the sound’s event to IndoorMuffled return to make it muffled so one can hear it from indoors as it should be. I have two snapshots; outdoor and indoor. In the indoor snapshot, IndoorMuffled return is 0 dB. So when mage outdoor casts, our mage indoors is hearing the original event (not muffled) and the muffled sound together.

Here is my second fail: I’m grouping the spell events to EQ snapshots. Now when our mage is indoors she is hearing every fireball sound muffled. Including her own.

Here is my solution without duplicating events: I’m sending the fireball event to IndoorMuffled, OutdoorMuffled, IndoorNormal and OutdoorNormal returns. Automating them like this: When the player outdoor is casting, the sound goes to IndoorMuffled and OutdoorNormal. When the player indoor is casting, the sound goes to OutdoorMuffled and IndoorNormal. I am automating the snapshots and voila!

Please help me if there is a more simple, plain and more efficient solution to that problem. My mind is about to explode. Thank you!

You could simplify by half, by doing that logic in the game code rather than in fmod routing. For each player, the game code can check if the emitted sound indoor/outdoor status is different or the same as the listener, and trigger the right fmod call (by using a parameter or a snapshot): if the status is the same, normal sound, if it’s not the same, muffled sound. Each player having its own instance of the game and of fmod engine, as Joseph said, the result sound could be different for each of them (at the same time normal for the player in the same place and muffled for the player in the other place).

1 Like

Ah! I think I understand now. You’re trying to build a simplified occlusion system, where the behavior of an event depends on whether there are any obstacles occluding the path between the event emitter and the listener, and thus muffling the sound heard by that listener.

(I previously misunderstood that you were assuming that every player in the game was a listener of equal weight to the others despite only one of them being controlled by the game instance’s player, as this is a common misunderstanding among new FMOD users. My apologies for the confusion.)

As Alcibiade says, your solution of using multiple automated returns is probably a step more complicated than it needs to be. From what you’ve said, the important detail isn’t whether each event instance is indoors or outdoors, but whether it’s in the same physical space as the listener. If you track that property of each event instance in your game’s code, you can use it to update a “is muffled” local parameter in each event instance, and automate the sends in those events on that parameter.

2 Likes

Thanks a lot!