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

Discussion Best solution for FPS?

Discussion in 'Multiplayer' started by rmele09, Oct 11, 2023.

  1. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    702
    I’ve been trying to figure out the best current networking solutions for a first person shooter, team death match type of game. 5 v 5 for example. There seems to be a few different options and I would like to hear opinions. How scalable is Unitys built in networking vs something like photon other 3rd party solution? What is everyone’s favorite 3rd party solution if unitys built in networking does not meet their needs? Thanks!
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    4,360
    Define "best".

    You mean whether it can handle 10 users?

    Sure, like all the other realtime UDP network transport protocols and their ease-of-use things like NetworkTransform, NetworkVariable, etc.

    The scaling of multiplayer game is 99% your own code. You can seriously trash any game by writing netcode that synchronizes every bullet ever fired every tick rather than synching that a player started or stopped shooting with a known (!) weapon with known fire rate and deterministic bullet flight path.
     
    rmele09 likes this.
  3. ep1s0de

    ep1s0de

    Joined:
    Dec 24, 2015
    Posts:
    164
    ENet in my opinion is the best solution for FPS on Unity
    It has the simplest functionality for receiving and transmitting data
     
    rmele09 likes this.
  4. whoft

    whoft

    Joined:
    Jul 1, 2021
    Posts:
    17
    Personally, I'm using Mirror for a similar game, but for a basic FPS anything should work.
     
    rmele09 likes this.
  5. rmele09

    rmele09

    Joined:
    Nov 8, 2010
    Posts:
    702
    Haha wtf are you talking about
     
  6. qbvbsite

    qbvbsite

    Joined:
    Feb 19, 2013
    Posts:
    83
    With something that small anything would probably work. For me I'm using LiteNetLib for all my networking. Currently running my MMO project at 32ms server ticks and about to handle movement updates of about 90-100 player objects. @CodeSmile is 100% correct in that your code is really the only limit on what your game can handle. Be smart about your updates and us client-side prediction/server reconciliation to have smooth movements /limit what you are sending out as updates.