Search Unity

Help Wanted What kind of networking technology to use?

Discussion in 'Multiplayer' started by Laguna_Seca, Sep 12, 2021.

  1. Laguna_Seca

    Laguna_Seca

    Joined:
    Mar 13, 2014
    Posts:
    160
    Forgive me if this issue was discussed many times, I re-read a lot of material, but still wanted to make sure and be confident in the choice.
    I am quite experienced in unity and I want to start promoting in multiplayer games, and start the first project. But I don't want to make a mistake and waste time.
    The essence of the game is that you create a character and then compete with another player 1 on 1. So I need a database and a game server where a room for 2 players will be created. Physics and smooth animation are important to me, that is, the game is not chess, but action. After the battle is over, I need to send the result to the database server.
    From everything I've read, as I understand it, PUN will work for me and using webhooks to interact with the database.
    Have I decided on the right technology?
    I would like to spend as little money as possible on the server and get easy deployment.
     
  2. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    58
    When I was thinking about making a multiplayer game I went through the same thought process. I have a few questions for you, is this a 3D or 2D game? Are you having this be server authoritative or is on client asking as the master? Can latency become an issue?

    PUN could work for sure but I does add a middle man that does add latency which may not be desired. In my game I decided to roll my own networking with LiteNetLib and do a console application as my authoritative server. This removed the added latency of PUN and gave me the flexibility of adding anything server side like save things to the database.
     
    Joe-Censored likes this.
  3. Laguna_Seca

    Laguna_Seca

    Joined:
    Mar 13, 2014
    Posts:
    160
    3D game, and the ability to synchronize the animation is important to me. Also, the game is fast and the latency is likely to be undesirable. LiteNetLib sounds like something difficult for a person unfamiliar with networking technologies. It is desirable, of course, to be able to prevent cheating (this is about the authoritarian server). I don't even know, writing an authoritarian server seems to be too long and expensive.
     
    Joe-Censored likes this.
  4. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    58
    Without knowing more details its hard to say what's the best fit but if you are planning to do an authoritative server (which could be a headless Unity server) I don't think PUN is your best choice. It would add 2 extra hops (Player -> PUN -> Server -> PUN -> Player) and add unneeded latency. With that said I would start looking into other libraries like LiteNetLib or Unity's MLAPI (Don't know much about this myself) since latency is not desirable for your game.
     
    Joe-Censored likes this.
  5. Laguna_Seca

    Laguna_Seca

    Joined:
    Mar 13, 2014
    Posts:
    160
    thanks for the help
     
unityunity