Search Unity

Difference between hosting static WebGL content and hosting multiplayer servers?

Discussion in 'Multiplayer' started by Edvard-D, May 26, 2020.

  1. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    Hey all! I'm new to multiplayer/networking, but have an idea that would require it. Sorry for the super nooby questions...

    The project is a first person game that would target WebGL. Since I'm new to all this, I'm confused about how server hosting works when combined with WebGL. I've seen lots of suggestions of hosting WebGL games using Firebase, but according to this video Firebase isn't the right solution if your game is real-time. I've seen some mention of using Firebase to host the "static content" (which I assume would be the static game files/build). If I wanted to use Firebase, would this mean that I would have two hosting providers: Firebase for static content and another service to host the server that clients would connect to? To make the question more generic, are static content and multiplayer servers different enough things such that they're treated differently even when using the same host?

    I have no frame of reference for this stuff, so any insight would be very much appreciated.
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,067
    There is a difference of hosting the files ("webserver") and running the game as host / dedicated server (basically your build running for others to connect to). You may need both.
     
    Joe-Censored likes this.
  3. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    Alright, thanks for confirming that!
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    WebGL also has significant networking limitations imposed by the browser. Make sure whatever networking system you choose has specific support for WebGL, as most do not.
     
  5. Edvard-D

    Edvard-D

    Joined:
    Jun 14, 2012
    Posts:
    129
    Thanks for the heads up. I'm using Mirror, which from my understanding does support it.