Search Unity

Unity and Rakvoice

Discussion in 'Multiplayer' started by martinf35, Jun 4, 2009.

  1. martinf35

    martinf35

    Joined:
    Jun 4, 2009
    Posts:
    6
    I'm currently working on a project of 3D chat in a web browser and I would like to include voIP using Rakvoice. My problem is that I can't use Rakvoice directly from Unity scripts and it is not possible to use a plugin that would be integrated to Unity as my program will be executed in a web browser.
    So my question is the following : does anyone has ever succeded in using Rakvoice in an Unity application executed in a web browser and if it is not possible what are the other ways to explore in order to include voIP in my project ?

    Thanks.
     
  2. gyst

    gyst

    Joined:
    May 22, 2009
    Posts:
    19
    That's really interesting... I'm working on a similar browser-based 3D chat application myself, so maybe we can put our heads together on this.

    While I've never used Rakvoice and don't know how it would work with Unity in a browser environment, I might suggest a possible workaround: You may consider supporting the VoIP channel outside of Unity via other elements of the website. For example, you could make a standalone VoIP app and embed it in the same webpage where your Unity-powered 3D environment is. The two applications can share information back and forth to create a seamless experience for the end user (at least this should be possible at the theoretical level... I don't have personal experience in this just yet).

    This isn't really what you were looking for, but it might get the job done. Then again, if anyone has any experience to do this directly within Unity, I'd love to hear it just as much as you.
     
  3. martinf35

    martinf35

    Joined:
    Jun 4, 2009
    Posts:
    6
    I kept googling for information about using Rakvoice in unity in a web based browsed environment and didn't get much information so that I decided to do it in an other way which is the same that you suggest.
    Indeed I have a library that deals with capturing and mixing sounds and I use it with a plugin in the web page where unity is running. I did some tests by sending data from an Unity client to another and the transmission time is never greater than 30ms so it seems to be a good solution. So if you plan to use voIP in your application I think it's a good alternative.
    The main problem for me is that users have to install the plugin the first time they connect but can't find a better solution.
     
  4. Veli

    Veli

    Joined:
    Mar 10, 2009
    Posts:
    301
  5. martinf35

    martinf35

    Joined:
    Jun 4, 2009
    Posts:
    6
    Yes that would be the best solution.
     
  6. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    I am late to the discussion, but this topic deserves more coverage!

    What is the most elegant solution currently available to incorporate voip into a Unity game? If the solution requires a plugin which isn't webplayer compatible, that would be ok.
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    anything that can be easily incorporated by offering a plain C interface :)

    TeamSpeak, Green Ear SDK, ... :)

    just keep in mind that if you need crossplatform, then it would become a much harder topic cause the options then dry out more or less.
     
  8. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    Yep, crossplatform compatibility is a must.

    Would it be possible to use the RakVoice plugin with Unity's networking implementation, or has it drifted too far from the official Raknet release?

    I am also much more interested in a solution which can be contained entirely in the distributed Unity applications. Hosting separate dedicated voice servers or having to handle player authentication separately for the voice communications would be a pain.
     
  9. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You can not add any raknet plugins with unity networking cause unity does not expose any handles to hook in at least none that I would know off.

    if you want to use them you must also shift the whole networking over to raknet in a plugin.

    and hosting seperate servers shouldn't be as much of a pain, as good latency + voice is favorable over "all on one server and crap latencies" cause the server can't keep up good latency and high traffic + server load ;) but that depends a bit on the hardware, if you have dedicated game hoster servers and put 1 game per server or 2 you might get away with it
     
  10. Aubrey-Falconer

    Aubrey-Falconer

    Joined:
    Feb 13, 2008
    Posts:
    438
    So the average gamer's internet connection wouldn't be capable of hosting a voice chat session for 16 or so of their friends?
    I really would love to go with a distributed model, as it makes scaling so much more fun...

    I suppose I will begin researching all the available options then. Do you know of anyone who has already done voice chat in a Unity game?
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    I think I somewhere read something on a game using it but that was windows standalone only I think.

    And average gamers connection will likely not host 16 player voice chat + usable realtime experience ... depending on your game you can already be happy if 16 players can be hosted.
     
  12. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    RakVoice would be intersting, I think they need to include more of the RakNet plugins personally, including the MySQL and PostGRES stuff. Have to be careful about the cross platform support, and web support though for anything you write. Especially the web interface, that is the huge hang up.