DarkPlacesEngine / DarkPlaces

The official repo (replaces SVN). Branches `master` and `div0-stable` are synchronised with https://gitlab.com/xonotic/darkplaces. Merge requests should target the `master` branch.
https://icculus.org/twilight/darkplaces/
GNU General Public License v2.0
270 stars 39 forks source link

Add voice chat (VoIP) #61

Open LegendaryGuard opened 1 year ago

LegendaryGuard commented 1 year ago

That has been discussed in forums and chats eventually, spontaneously and occasionally. Some people thought Mumble is the alternative to implement that.

LegendaryGuard commented 1 year ago

There's an old issue in another site, I crosslink to this duplicated:

Maybe the discussion can continue here. Also, there is another discussion reference about Mumble support: https://gitlab.com/xonotic/darkplaces/-/issues/69

z411 commented 1 year ago

It sounds like a lot of work, but it's definitely a expected feature in games nowadays. People mostly use Mumble as communication but having it in-game would be helpful for new players who aren't in the server of the regular players but still want to participate in the chat. It would especially be helpful in teamplay gamemodes where private communication between team mates is required.

Also in my experience the community isn't toxic enough to see the feature as a minus rather than a plus overall, but it should definitely be disableable.

Technically speaking, AFAIK, the DP connection with clients has quite a low bandwidth so voice communication would require a separate connection through a different port. One option would be to implement it from scratch using libopus (the library itself isn't hard to use but ensuring reliable communication at the network level could prove difficult) which would be the lightweight and flexible option, or DP could simply start or use an existing Murmur server, and have the clients simply be Mumble clients, to achieve the same result. As an aside, Mumble uses two sockets, TCP and UDP, for control and voice respectively, over a single port.

That said, it's easy to think of ways to do it, but hard to find someone knowledgeable enough to implement.

hemebond commented 1 year ago

have the clients simply be Mumble clients

:thumbsup:

Krzmbrzl commented 1 year ago

Note that for basing voice-comm on the Mumble protocol, it is probably easiest to make use of https://github.com/mumble-voip/libmumble/, once its API has finalized. In its current state the library works, but we are still messing around with the API so if you adopt it in its current state, be prepared to refactor your code a bit between versions of the library.

The library is intended to implement all the actual low-level protocol details and allow you to simply operate on the level of "here is an audio packet - send it" with the library taking care of encoding that with the correct codec and using the proper packet format to send it to the Mumble server. Therefore, you would not have to reimplement the protocol handling yourself.

hemebond commented 9 months ago

Is the original intent of the task to make the server act as a VoIP server (server-wide communication)? Or would the voice streams of each player be controllable by the game code? e.g., proximity voice chat, in-game communication devices, etc.