Search Unity

Feedback Unity networking or custom dedicated server

Discussion in 'General Discussion' started by Irrgeist, Mar 20, 2021.

  1. Irrgeist

    Irrgeist

    Joined:
    Jul 9, 2015
    Posts:
    28
    Hey,

    I am about to start a new project. The game will be like a manager type of multiplayer strategy game. To make it easy, think of a board game but not turn based. So there will be no Unity physics etc.

    I also want to have a dedicated server. I wonder which approach is better:

    1.) Using Unity's build in networking
    2.) Writing my own Server using Sockets (I would do it in C++ or C#)

    Afaik the Unity networking stuff will clutter my code, if I decide to do Client and Server in one project. Maybe there is someone with a little bit of experience regarding this topic and can give me some ideas or directions, pros and cons?!
     
  2. If you never built a networking game, my advice is to start small. Networking is basically starting all over again. Like when you start building games, you start small so you can finish something and learn how to do things, Real time networking is especially interesting and full of traps. Building small networked games first (like real multiplayer board games, backgamon and whatnot) would help you learn how to approach things without the need of multi-months development time. Also I would start with turn based stuff first, that's easier from networking point of view.

    If you never built a networking game (since you're asking this I assume this is the situation) and you don't want to go through the learning curve, try Photon. It's one of the easiest way to get into server-authoritative games and they have all the services you need and free while you're developing.
     
  3. Irrgeist

    Irrgeist

    Joined:
    Jul 9, 2015
    Posts:
    28
    Hi :)

    Yes, this would be my real first networking game, but not my first networking application (hence the idea to develop the dedicated server in C++, since I've already built some more or less complex realtime multi connection, thread based server/client applications, even low level tcp/udp sockets stuff using FlatBuffers as a net message wrapper). But maybe building a server from scratch instead of using Unity's built-in stuff is overkill for such a project?

    Afaik Photon is some kind of hosted networking service framework hiding all the dedicated server stuff?

    Edit: Also I am not really up to date on all the possiblities Unity itself or third parties offer. Maybe I am wrong, but Photon would not allow my players to host their own games in their private network?