Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity 5 and third-party networking libraries for Webplayer

Discussion in 'Multiplayer' started by jaybennett, Mar 19, 2014.

  1. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    I'm currently using Photon Server SDK to build an online game for the webplayer.

    Unity5 was big news, with Webplayer now building to javascript and changing the runtime completely.

    I've heard things about lack of support for UDP, among other pitfalls. How will this affect a Photon client? Is the Exit Games team given a sneak peek in order to adjust what may need adjusting??
     
  2. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    449
    It would certainly be for the worse if the new Unity3D webplayer wasn't compatible with the Photon Server SDK. Honestly, I tried to make a webplayer build the other day and couldn't connect to my Photon Application. I kept receiving a security exception. It was odd, I don't know why I was getting it. I didn't have time to look into it though since it was just a project I use to prototype networking stuff in.

    Hopefully this new webplayer doesn't break everything. I'm excited because a lot more people will play your application if it doesn't require a plugin to download.
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,021
    Jay: We will look into WebGL support as soon as we can get our hands on an early exporter version. Maybe we can't use UDP but WebSockets might be an option. I don't think multiplayer will not be impossible.

    Glader: Usually, the current WebPlayer should work without issues. It does a policy request to access our servers and those seem to be failing in some cases. I'm not sure if that's an issue on the server side, on the client side or something in-between. If you have the issue again: Can you mail us the Photon Cloud region you tried and the IP that failed to connect (if you can see that in the logs)? To: developer@exitgames.com
     
  4. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    @tobias Okay man, sounds good! Thanks for the update.

    @Glader Do you have a crossdomain.xml file set up?? The Webplayer is a "secure sandbox" so any time you try to make connections with other things (like a Photon application) you have to do some setup work to authorize it. It sometimes works in the Editor but then if you make a build it can work differently.
     
  5. HonoraryBob

    HonoraryBob

    Joined:
    May 26, 2011
    Posts:
    1,212
    Unless something has drastically changed recently, Javascript is horrendously slow. One benchmark found it was 20 times slower than native code. Apparently Unity is going to use asm.js, but that only currently works with Firefox.

    Unless I'm missing something, that just sounds like a recipe for disaster. And it's ironic given that the webplayer now has such a massive installed base.
     
    Last edited: Mar 21, 2014
  6. unityuser1324235141

    unityuser1324235141

    Joined:
    Apr 5, 2013
    Posts:
    44
    Isn't the current WebPlayer still going to exist? I was under the impression that the new option was just a somewhat improved version for pro users.