Nexuiz support?

2007-11-07
2012-10-30
  • Rudolf Polzer

    Rudolf Polzer - 2007-11-07

    I am one of the developers of Nexuiz (a first-person shooter) and would like to add voice chat support to it, and want to know if Mumble is what I am looking for. How would I best achieve my first-person shooter voice chat with Mumble?

    The requirements would be:

    • players get automatically assigned to the channel of the right team
    • there must be no way to "spy" on the other team by joining their channel in Mumble
    • if possible, NO directional audio, or directionality should be an option the player can configure - as Nexuiz is so fast paced, voice would change direction too often which gets irritating
    • clients must not be able to get the location or direction of enemies (as that can be used as a "wallhack" to see where your enemies (in DM) are if you can't see them). If the server mixes the sound and knows the positions, that may still be okay, but if the positions are sent to the clients, it would be just too prone to using it for cheating

    I am thinking of an implementation like this:

    • the game server manages an IP ACL on the Mumble server so only members of a team can enter a channel
    • when switching team or spectating state, the server sends a command to the client that tells the client to tell his Mumble client to join the right channel
    • when leaving the server, the server removes you from the ACL, which should cause Mumble to automatically kick the player out

    In deathmatch (everyone against everyone), positional audio must be forcefully disabled, while it would be okay in team matches to hear where your team mates are.

    So, what we would need in the interface to Mumble is:

    • Server: an external process needs to be able to manage channel ACLs and player positions (to disable directionality, it could probably just position all players on the coordinate system origin)
    • Client: an external process needs to be able to communicate to the client to make it join a Mumble server and channel
    • all this has to be cross platform (the Link plugin appears to be Win32 only, when I look at the API calls that are used for it)

    Is this already possible by a Mumble plugin, and if yes, can you point me in the direction? Or even better, is there already a way to achive all that without making a specific plugin, by using existing IPC means of Mumble? Nexuiz can already send UDP packets of almost arbitrary content (well, the packets all start with \xFF\xFF\xFF\xFF and then can only contain ASCII) to any IP, so a UDP socket listening on 127.0.0.1 would be one of many solutions to this.

     
    • Rudolf Polzer

      Rudolf Polzer - 2007-11-07

      Hm... dbus looks indeed like the interface I can use... but... is there any specification on the Murmur and Mumble DBus requests? And... how to do that from C, as the engine Nexuiz uses is written in C? As my idea only requires SENDING dbus requests... is it possible to send a request to dbus without waiting for it to complete (so it does not lag the game server)?

       
      • Thorvald Natvig

        Thorvald Natvig - 2007-11-07

        How convenient. DBus is written in C too ;)
        http://www.freedesktop.org/wiki/Software/dbus

        Oneshotting requests is possible, but requires you to move outside the normal API calls. Might I suggest a DBus thread instead?

         
    • Asaru

      Asaru - 2007-11-07

      i think what you are looking for is something like this:
      http://mumble.sourceforge.net/ACL_and_Groups#Group_of_servers_with_FPS_game

      you could manage the murmur server from a nexuiz plugin through the murmur dbus interface
      otherwise its not event driven and need to be polled

      but then murmur is running beside nexuiz.

      that link plugin for win32 hooks some functions from the game or read some memory adresses i think.. but since nexuiz can be compiled by everyone it have to be done to make it dynamicaly searching the memory for that adresses.

       
    • Thorvald Natvig

      Thorvald Natvig - 2007-11-07

      The Link plugin is only to provide Mumble with positional audio, so it's not what you're looking for.

      Mumble and Murmur use DBus as IPC. Have a look at http://sourceforge.net/tracker/index.php?func=detail&aid=1817016&group_id=147372&atid=768008 which should address your needs :)