Battlefield 1942 - Plugin help!

Ice/DBus, Web-Interfaces, Management tools

Battlefield 1942 - Plugin help!

Postby Dementei » Mon Feb 15, 2016 9:23 am

Hey everyone.. so we've got a community trying to organize a sort of package for BF1942 including the Mumble plugin used for positional voice tracking, but there seems to be a problem with the plugin. I'd really like some help on figuring out how to fix it or to do whatever it takes to get this working as it should, because right now it seems to be incomplete. Here's the plugin source files I believe.

The goal is to make it work exactly like how the BF2 plugin does, it tracks player positions relative to each other including volume = distance and where players are looking. Currently the plugin for 1942 picks up on where the player is looking and adjusts the volume according to where each of the players are, except it doesn't account for distance, or maybe it's set to a singular distance, or something.

So if anyone has a clue as to how to get this functioning properly, please let me know, there's an entire community backing for this feature to be completed, thanks.

BF1942 plugin testing by community leader: https://www.youtube.com/watch?v=JeKeUWZHQJY
Dementei
 
Posts: 4
Joined: Mon Feb 15, 2016 9:09 am

Re: Battlefield 1942 - Plugin help!

Postby fwaggle » Mon Feb 15, 2016 11:36 am

What's your settings for max-distance, min-distance and so on for the positional audio section of audio output in Mumble's settings?

Because I don't know whether it's possible for something to be wrong in the way you're describing - each of the plugins simply sends the context and identity strings, along with their current position when they're transmitting. When your client receives audio with this data, it takes your current position and your heading, and uses that to decide where to pan the audio. There's not really any separate distance data transmitted, it's just inferred from the position, which if everyone's position was garbage or zeroed, would not result in the effect (if your position is identical to another user's, you don't get audio panning, and if the other person's position was garbage you walking around them would not result in the panning seen at about 12s into the video).

So for distance to work right, you basically need to set minimum volume to something lower (not sure what the default is, I think it's pretty high to make sure everyone can always hear?) - I've had it be pretty convincing at about 75% or so, go lower for more realism. Minimum and maximum distance depends entirely on the game, you'll have to experiment with that but they need to be decently far apart for it to work. I think the code basically works out the ratio between minimum and max distance, and how far along that scale you are, and then applies that to the percentage that's removed from "minimum volume". So if max-distance and min-distance are both set to 1, or if minimum volume is set to 100%, you won't have any audio fade off (it's entirely possible I'm wrong here though).

I'm not entirely sure what bloom does - I think it makes it so that some noise still comes out the opposite ear to the panning one so it's not so jarring, but I don't think it has anything to do with distance.

Hope that helps. BTW if you guys verify the plugin works, have the committer submit the changes in a pull request and then when it's committed and built, everyone with an up to date Mumble version will get the new plugin automatically - no need to package it (which introduces trust issues).
Full disclosure: I run a semi-commercial Mumble host, and my opinions do not reflect the opinions of the Mumble project.
Avatar is stolen from here
User avatar
fwaggle
Team member
Team member
 
Posts: 212
Joined: Tue Oct 06, 2009 10:40 pm
Location: Australia

Re: Battlefield 1942 - Plugin help!

Postby Dementei » Mon Feb 15, 2016 7:04 pm

Oh wow thank you for the detailed information, this may be exactly what we needed to figure this out. Currently my max distance is 15.0m, minimum is 1.0m, minimum volume is 80%, and bloom is 150%. Okay I understand, so basically setting the minimum volume lower will help with the distance. I probably won't mess with the Bloom then.

I don't think the maximum distance works completely though, since you can be on the farthest parts of the map from each other, but as long as you aim at that person you can still hear them as if they were 1.0m away. Which that is the only part of the plugin that doesn't seem to function properly. Any ideas on that? (Edit: Oh wait it just occurred to me that maybe 1.0m is a much much bigger scale for BF1942, I will test it at a much lower distance.)

The plugin is currently already published with Mumble, but if it needs an update I'll let them know, though I did send a couple of the github contributors emails so we'll see.
Dementei
 
Posts: 4
Joined: Mon Feb 15, 2016 9:09 am

Re: Battlefield 1942 - Plugin help!

Postby Dementei » Mon Feb 15, 2016 9:11 pm

Okay so I did some tests with a friend, and the same issue occurs in other games, no matter the distance between the players, as long as you look at their general direction the volume is always the same regardless of the settings. So I think there is an issue with Mumble or the plugins, some extra coding may be necessary, unless we're doing something wrong.

Nevermind holy.. sh..it....the ENTIRE TIME, okay so MINIMUM VOLUME needs to be set at 0% in order for this to work properly.
Dementei
 
Posts: 4
Joined: Mon Feb 15, 2016 9:09 am

Re: Battlefield 1942 - Plugin help!

Postby fwaggle » Tue Feb 16, 2016 1:12 am

Dementei wrote:Nevermind holy.. sh..it....the ENTIRE TIME, okay so MINIMUM VOLUME needs to be set at 0% in order for this to work properly.

You might not want it at zero %, unless you want to not hear people at all that are beyond "max distance" away. But yeah, play with the settings, it sounds like you guys have it working correctly. You can probably find a happy medium between the positional audio working convincingly and still being able to use it like a radio.

When it's working right it'll hit you one day that you'll say "where are you?" and a friend will say "over here" and you'll know where they are - it's pretty surreal, but some people hate it (my wife can't stand positional audio).

Edit:
Dementei wrote:(Edit: Oh wait it just occurred to me that maybe 1.0m is a much much bigger scale for BF1942, I will test it at a much lower distance.)

It's entirely possible, and in fact I dunno if "meters" is the right term. Ideally if 1.0 game coordinates in game is bigger than what you'd reliably guess is a meter in game, the plugin should be doing math on the coordinates to make up for that (because the alternative is having to adjust max-distance and min-distance for every game which is not particularly useful).
Full disclosure: I run a semi-commercial Mumble host, and my opinions do not reflect the opinions of the Mumble project.
Avatar is stolen from here
User avatar
fwaggle
Team member
Team member
 
Posts: 212
Joined: Tue Oct 06, 2009 10:40 pm
Location: Australia

Re: Battlefield 1942 - Plugin help!

Postby Dementei » Tue Feb 16, 2016 1:43 am

Thanks for your input, I wouldn't have seen the Output settings, setting it to 0% was exactly what we needed though, after the maximum distance we don't want anyone to hear each other, you have to be close to hear them instead of acting as a radio. For radio we'd need to do some extra work, extra binds and scripts. We actually made a video of it if you want to take a look, we're pretty happy about it. I think all multiplayer games like this should have positional audio and a radio function, it's way more immersive and cooperative. Btw the scale seemed to be exact in game, 15m was fine.
Dementei
 
Posts: 4
Joined: Mon Feb 15, 2016 9:09 am

Re: Battlefield 1942 - Plugin help!

Postby hacst » Tue Feb 16, 2016 10:04 pm

As mentioned in my mail reply to you: We would be happy to accept patches to make it work better. Have you already taken a look at https://wiki.mumble.info/wiki/Pluginguide ? It contains a fairly decent description of the process to figure out the memory location for the information you want to retrieve from the game for use in the plugin.

To elaborate on that further: For the BF2 plugin we extract a whole slew of additional information like team membership, squad, rank and so on that can be used by serverside scripting. Back whenever we extended it that way I also created a serverside bf2 mumo plugin which uses all that information to dynamically assign groups to players and move them into appropriate channels. That allows for some pretty elaborate setups and - from what I was told - seemed to work. Dunno if it's still used by PR. If that's what you want in Bf 1942 you would have to find the corresponding memory locations and extend the plugin accordingly. That mostly takes persistence and is much less complex than it might sound so no worries.
hacst
Team member
Team member
 
Posts: 338
Joined: Wed Sep 23, 2009 4:28 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests

cron