What Unity Networking Solution Should I Use?

Sdílet
Vložit
  • čas přidán 6. 06. 2024
  • Today we'll be delving deep into some basic multiplayer networking as well as going over some of the popular networking solutions in unity to determine which one is right for you in your multiplayer projects! Hopefully this helps you with your game development journey into multiplayer!
    ___________________________________________________________________________
    Be sure to like and subscribe for more game dev content!
    For updates, follow my other socials!
    Twitter: / khodowstudios
    IG: / khodowstudios
    00:00 Introduction
    01:26 Multiplayer Components
    02:34 Multiplayer Models
    06:11 Multiplayer Solutions in Unity
    09:55 Conclusion
  • Hry

Komentáře • 74

  • @AstroViral
    @AstroViral Před rokem +3

    Just the video I needed! Thanks!

  • @kloa4219
    @kloa4219 Před rokem +14

    found your channel via the algorithm, prepare for 15k+ views

  • @foreigndev
    @foreigndev Před rokem +7

    Really useful video! I think that Mirror is a great solution for not so complex games.

  • @yuchen3587
    @yuchen3587 Před rokem +2

    Very good video! Good job bro!

  • @user-qr4jf4tv2x
    @user-qr4jf4tv2x Před 2 měsíci +3

    open source solution like mirror,fishnet is great if you willing to learn beyond multiplayer and don't mind dealing with Kubernetes but just getting it deployed in a single server instance is good too

  • @DevNoob
    @DevNoob Před rokem +6

    I'm using photon when I multiplayer. Great video. Learned a good lot :D

  • @TheChopinist
    @TheChopinist Před rokem +2

    Nice vid good Quality :D

  • @JackOfNothing
    @JackOfNothing Před 11 měsíci +6

    This is a great video thank you.
    Ive also been looking for a video explaining the programing logical differences between setting up singleplayer vs multiplayer and what practices I should implement while coding a singleplayer project that would make it easier to switch to multiplayer if I decided to.

    • @KHodow
      @KHodow  Před 11 měsíci

      Thanks so much! 😄

    • @jonnathanhilliard5684
      @jonnathanhilliard5684 Před 7 měsíci

      a few...separate out input from character & vehicle control and movement code, so you can pass it in from the player, or any player or from Ai. Do the same with creation of all objects, characters, projectiles... and pass in the creation data as a class/struct that can be easily sent across the network. include the player/owner ID with everything. Try to make your code deterministic, not random. ITs easier to keep things in sync ( or looking in sync ) across machines.

  • @Project-NSX
    @Project-NSX Před rokem +4

    Hi. Thanks for the video. I'd just like to ask a question though as I've found conflicting information. From what I've read, Pun 2 and Fusion are Hybrid models (Client-server p2p) as a client always needs to have ownership of an object in order to run logic on it. Is this statement accurate of is the information I've been finding on this incorrect and you're actually able to run logic on the server without a client owning it?

  • @richardhuang9550
    @richardhuang9550 Před rokem +2

    Good vid! 🙂

  • @Hersatz
    @Hersatz Před 5 měsíci +3

    Saw the video on my feed.
    Wanted to jump in to throw my grain of salt as I've worked professionally with networking in Unity for a while now.
    We've had to use both Netcode for game object and Photon Pun2 on different projects.
    Netcode still has a very long way to go compared to photon's solutions.
    It's getting there, but with photon you can just plug and play so much stuff that you have to code yourself with Unity's solution (lobby/Relay especially).
    With Pun2, if you want a lobby and you know your way around the base concepts of RPCs, you can make a solid reusable one in a couple of days, alone, easy peesy.
    With unity, it took one of our guy something like 1 week and a half of fighting the code base to get the bare minimum of a lobby for delivery.
    After that, it all comes down to a price question.
    What can you afford for your project.
    Whichever you choose, the knowledge transfers very well from one solution to another. As well as from one engine to another. Rpcs are Rpcs, netvars are netvars, and so on.

    • @KHodow
      @KHodow  Před 5 měsíci +1

      Thanks for sharing your knowledge!

  • @KeyboardKrieger
    @KeyboardKrieger Před rokem +36

    You forgot one: Making the backend yourself^^
    It's the hardest solution, but at least for turn based games this could be an option.

    • @mattseaton5832
      @mattseaton5832 Před rokem +6

      I don't really see the point though unless you just want to learn and play around. You can easily build a turn based games on top of any of these APIs with RPCs or custom message channels.

    • @KeyboardKrieger
      @KeyboardKrieger Před rokem +4

      @@mattseaton5832 it's more cost efficient and scales better. Turn based games use nearly to no traffic, so you can handle lots of players at the same time.
      The premade solution are payed via active players count, so they are all more costly.

    • @mattseaton5832
      @mattseaton5832 Před rokem +2

      @@KeyboardKrieger if you mean hardware servers, ok. I thought he meant software.

    • @azrail7896
      @azrail7896 Před měsícem +1

      are there like any tutorials on how to do it?

    • @KeyboardKrieger
      @KeyboardKrieger Před měsícem

      @@azrail7896 I don't know any for real time stuff. But for turn based you basically just need an API or a signalr connection. If you know how to do this for regular software it's no problem to transfer this knowledge to unity

  • @chimz8057
    @chimz8057 Před rokem +15

    I really want to use Unity's own networking but I just can't trust them.
    Unity has a history of deprecating systems without having made replacements beforehand. The older Unity Networking systems received the same treatment. How do I know they won't deprecate this system in two years either?

    • @mattseaton5832
      @mattseaton5832 Před rokem +2

      Same. But I do think their solutions will stick around this time. The bigger issue is how long before they get the features you need. Fishnet already has CSP, rollback, network LOD, etc.. But I really want to use NGO just because there's so much code available in their example projects. But I don't have the time or knowledge to build all these features by myself.

  • @MattSimon1
    @MattSimon1 Před rokem +5

    I wish you included more details for Pun 2, Fusion and yes, Bolt. Bolt and Fusion are both newer and support things that Pun 2 doesn't, like client-side prediction and lag compensation (see their feature comparison page) and Pun 2 will only support Unity 2019 - 2022. That said, the pricing for Pun 2 and Bolt are cheaper than for Fusion for the same CCUs.

    • @MattSimon1
      @MattSimon1 Před rokem

      @@KHodow No problem. Have a great week!

  • @kantagara
    @kantagara Před rokem +6

    Also, you should've included Photon Quantum. Even tho it's still premium (so you pay 250$ per month to use it), it's by far the most superior solution I've ever worked with.

    • @user-ez7ls2du9c
      @user-ez7ls2du9c Před 4 měsíci

      Except its awful unless youre making a 4 player lan game or a host-client game. If your game needs dedicated server you cant use any of these solutions youll need to either roll your own pure code server side API or use an existing one like smartfox

  • @Angry-Lynx
    @Angry-Lynx Před rokem +2

    mirage, the only sensible >FREE< solution currently with server authoritative architecture

  • @alvisefusaro529
    @alvisefusaro529 Před 2 měsíci

    Hi great video thanks, maybe you can help me. i'm working on a turn based game meant to be deployed as webGL, i started with Relay but i realized the Unity Transfer protocol is not supported in webGL. What do you suggest using?

  • @sarthaksthapit
    @sarthaksthapit Před měsícem

    i am trying to find for Pc and VR game similar to game called: Davigo, Can I get some hints on which free solution I can build such in a local network?

  • @CreeperMinecraft2000
    @CreeperMinecraft2000 Před 10 měsíci +5

    What about Alteruna multiplayer?
    They give free servers.

    • @KHodow
      @KHodow  Před 10 měsíci +1

      I haven't heard of that one! Thanks for the tip!

  • @conceptualandclinical190

    Can you please explain how does pricing works ? I checked a few services but I don’t understand their pricing and I’m unable to decide which one to go for.

    • @conceptualandclinical190
      @conceptualandclinical190 Před rokem

      @@KHodow photon fusion vs netcode of unity game services. Can you help me with the pricing part. My game will be a 2D platformer

  • @K3rhos
    @K3rhos Před 9 měsíci +3

    I'm making an open world game, where there is a lot of entities to manage at the same time, I also need to have the possibility for the client to Host is own game (not only dedicated servers), and so other clients can see the hosted lobbies in a lobby list (a sort of servers list) and join them. I wanted to go for Netcode for gameobjects, but not really sure if that's performant enough for what I want. What would you advise ?

    • @KHodow
      @KHodow  Před 9 měsíci

      Netcode is definitely one of the more performant ones. Although you'll probably want to use some kind of chunk loading and entity despawn system for something like an open world game since something like that will definitely start to lag real quick no matter what framework you use!

    • @K3rhos
      @K3rhos Před 9 měsíci +1

      @@KHodow Okay thanks for the infos.

    • @KHodow
      @KHodow  Před 9 měsíci +1

      @@K3rhos Ofc good luck with your project!

    • @vincentsempiternalis3935
      @vincentsempiternalis3935 Před 8 měsíci

      @@KHodow Great video, man! Is it possible to make a sort of "server list" where players can click the "join" button to join games in Fishnet? I've been looking for ways to do that in Mirror (without using FizzySteamworks. It's difficult for me to test via Steam since I can only use one account at a time) but I couldn't find anything on it. Thanks!

  • @avve558
    @avve558 Před 5 měsíci +1

    Maybe a dumb question, but since Mirror is open source do I need to pay them if i were to publish a game. Or do I have to mention them in the game?

    • @KHodow
      @KHodow  Před 5 měsíci +1

      No mirror is absolutely free! Although if you use a third party service for dedicated servers, you may have to pay for that!

  • @Alex-jx3if
    @Alex-jx3if Před 2 měsíci +1

    What happens if you go over your allowed concurrent players in pun 2

  • @lgent2435
    @lgent2435 Před rokem +5

    Please, please, I need more Unity's Networking content..... Especially for the FishNet tutorials.

    • @nbarunway2561
      @nbarunway2561 Před rokem

      ​@@KHodow there is alreadg lobby system in fishnet already made by the creator of fishnet.

    • @user-ez7ls2du9c
      @user-ez7ls2du9c Před 7 měsíci

      FishNet is a bloated mess, it uses RPCs for everything and its full of bugs, I suggest staying away. Unless you want to make a super simple LAN game for up to 4 players.

  • @manutm4uu
    @manutm4uu Před 10 měsíci +2

    I am planing to make a poker card game , can you suggest the best solution?

    • @KHodow
      @KHodow  Před 10 měsíci +1

      I would suggest netcode for gameobjects if you're starting new. It's pretty well supported and not too hard too use. There's a really good codemonkey tutorial on it! Fishnet is also a good option but it's a little less documented.

  • @idontunderstandnihongoqwq940

    Is fishnet good for Voice chat? Need a Voice chat like Mirror for free or opensource

  • @Angry-Lynx
    @Angry-Lynx Před rokem +2

    and pun if you want as simple as possible and client authoritative, p2p arch

  • @blm_broly8600
    @blm_broly8600 Před rokem +1

    I want to make low poly fps shooter game but I'm hesitant because I don't have money to buy servers and pay for them and I'm afraid to use unity networking xd can you help me

  • @sillyninja65
    @sillyninja65 Před 11 měsíci +2

    i tried fishnet, the tutorials were pretty garbage. photon 2 has been incredibly easy. got multiplayer working with other people in 2 days of light work

    • @KHodow
      @KHodow  Před 11 měsíci

      Yea I wasn't too keen on fishnet's documentation either. Although in it's defense, I probably could've put more effort into learning it! Good to hear that you got photon working well! 🙂

  • @caden3ds
    @caden3ds Před 5 měsíci

    normcore on top

  • @FarSam25
    @FarSam25 Před 9 měsíci

    Unity gaming services are restricted in my country how can i make my game online?

  • @ramstar
    @ramstar Před rokem +2

    How about netcode?

  • @m-ation
    @m-ation Před rokem +1

    so what's the solution thas used in brawl star

    • @m-ation
      @m-ation Před rokem

      @@KHodow so Can I make a game similar to brawl star with netcode or photon?

    • @m-ation
      @m-ation Před rokem

      @@KHodow thanks you much
      Happy to find your channel

  • @curiousrodeo
    @curiousrodeo Před 9 měsíci

    Normcore

  • @user-ez7ls2du9c
    @user-ez7ls2du9c Před 7 měsíci +1

    Fish is full of bugs and the framework is a mess, loads of bugs aswell. Its OK if you want to make a 4 player LAN game, anything even remotely more complex will be much easier to make with other solutions.

  • @bluzenkk
    @bluzenkk Před rokem

    Grammer: which^

  • @AugustArtAngel
    @AugustArtAngel Před 2 dny

    not useful , information is so narrow, with this i can not decide which is good choice... but thank anyway

  • @daxtermaster6793
    @daxtermaster6793 Před 10 měsíci +17

    You said nothing

    • @TheUnsubScribe
      @TheUnsubScribe Před 7 měsíci +1

      Wtf are you top Comment for us? No offense, but… Screw you, dude. At least he’s trying to contribute to the public forums in a legit and constructive manner. Whereas you do not, from thus-far interactions. Sure, it’s basic stuff. But basic stuff is still super important to explain in an engaging manner. This dude did better than many other YTers that have tried. You make a vid and get back to us, eh?
      Edit: Added “no offense”