Search Unity

Need to make multiplayer not using Unity's servers

Discussion in 'Multiplayer' started by Unforgiven17, Nov 5, 2017.

  1. Unforgiven17

    Unforgiven17

    Joined:
    Aug 14, 2017
    Posts:
    4
    Hello guys,

    I want to make a multiplayer game that doesn't use Unity servers, but i don't know if it's possible.

    Does Unity allow P2P games ?
    If it doesn't allow, Can i make the players join my own servers to play ?

    Those are some of the questions that i have.

    If any of these are possible to do, what's the best way to do it ?

    Thanks in advance .
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You don't need any of their services. Build your game, upload it to a VPS or dedicated server, connect to it, done.
    The Unity Multiplayer Services are for matchmaking, relaying etc. and kinda optional / not even necessary in many scenarios.
     
  3. Unforgiven17

    Unforgiven17

    Joined:
    Aug 14, 2017
    Posts:
    4
    Thanks for the reply

    So far i only manage to find information on how to build a multiplayer game with Unity NetworkManager, do you have any docs/tutorials on how to do it without?
     
  4. Mickey_omar

    Mickey_omar

    Joined:
    Jan 7, 2017
    Posts:
    8
    I too would like to know how to build a project without the Unity's API for an online dedicated server. A tutorial would be great and github repo would be perfect. Thanks
     
  5. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    NetworkManager is what you are looking for. That doesn't use the Unity services by default.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You can connect to another machine directly, ie the player is the server.
     
  7. Mickey_omar

    Mickey_omar

    Joined:
    Jan 7, 2017
    Posts:
    8
    Thanks vis2k and hippocoder. I did not understand this part "That doesn't use the Unity services by default". What do you mean by default, Isn't this the class that create matches and list the matches using Unity's service?

    Another question is, I want the host to be headless online server, not a player. Can this be accomplished using NetworkManager? If yes, any guidance would be appreciated. Thanks
     
  8. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Read this: https://docs.unity3d.com/Manual/UNet.html
    For example, my uMMORPG Asset: it uses UNET and the NetworkManager and so on, but I don't pay Unity monthly. I just host it on a dedicated server and that's it. And yes, NetworkManager would allow to use Unity's services if I wanted to, but I don't have to.