Answering your Unity Multiplayer Questions (Netcode for Game Objects)

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

ความคิดเห็น • 134

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  ปีที่แล้ว +4

    ❤ Watch my FREE Complete Multiplayer Course th-cam.com/video/7glCsF9fv3s/w-d-xo.html

  • @S_Tadz
    @S_Tadz 2 ปีที่แล้ว +36

    Forget TH-cam, this deserves a well-structured, in-depth tutorial like the Turn-Based strategy one. Just a bunch of scattered 10 min videos won't take anyone anywhere, the topic is too broad and complex.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +18

      The tutorial that I'm working on is looking like it's going to be about 40min long which is a good amount of time to cover quite a lot of things.

    • @marksmithcollins
      @marksmithcollins 2 ปีที่แล้ว +3

      Why you think youtube video should be 10mins?

    • @MIKE-MURPHY
      @MIKE-MURPHY 2 ปีที่แล้ว

      @이름 its a known time frame youtubers try to adhere to. Its good for youtube algorithms. Not saying he did that necessarily. So usually they make a small video to draw attention to larger videos they will put out later that you might not automatically get in your feed like a smaller video.

    • @_GhostMiner
      @_GhostMiner 2 ปีที่แล้ว +1

      Just make it a playlist. 🤦‍♀️

    • @_GhostMiner
      @_GhostMiner 2 ปีที่แล้ว

      @@marksmithcollins because it used to be that to get as many ads as possible you had to make the video at least 10 minutes.

  • @striverfor7628
    @striverfor7628 2 ปีที่แล้ว +31

    0:19 What is the limitation for small scale games?
    1:48 Visual scripting
    2:17 DOTS multiplayer
    2:40 Addition to Code Monkey's course
    3:16 Complete course on multiplayer
    4:00 Pricing
    5:47 Is it server or client authoritative?
    6:34 Rollback netcode
    7:06
    7:27 Does it integrate well with existing solutions like Steam?
    7:45 Adding it to current projects
    8:10 For creating a metaverse game with 100s of players
    8:26 A good solution for a 2 player card game?
    8:48 Would it work for an RTS?
    9:20 Combining Mirror with Unity Transport
    9:34 To share data amongst users in a mobile app
    10:02 Can it be self-hosted?
    10:18 When making a survival game
    10:33 Peer2Peer

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +6

      Thanks for that! I'm super busy working on tons of videos so didn't have time to make timestamps

    • @striverfor7628
      @striverfor7628 2 ปีที่แล้ว

      @@CodeMonkeyUnity As someone new and learning, I like a video broken down and to save as much time as possible in being able to find exact info I want again. Keep up your great work

  • @RobinDoesUnity
    @RobinDoesUnity ปีที่แล้ว +12

    Thank you for the incredibly high quality of your content. Your Unity tutorials helped me a lot in the past years.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  ปีที่แล้ว +1

      Many thanks for the super thanks! I'm glad the videos have helped you!

    • @progCan
      @progCan ปีที่แล้ว +2

      OMG 50 EURO?!?! INSANE SUPPORT DUDE! 😃

  • @tomtomkowski7653
    @tomtomkowski7653 ปีที่แล้ว +3

    2:40 - adding multiplayer with an authoritative server to your turn-based strategy game would be awesome!

  • @geri4367
    @geri4367 2 ปีที่แล้ว +31

    Hell yeah. Give us all the multiplayer and keep up the great content. You are a machine, you deliver so much good stuff consistently :D

  • @NachitenRemix
    @NachitenRemix 2 ปีที่แล้ว +3

    Im very happy to see my comment in one of the screenshots you showed (3:17), I love to see that you really read the comments and take suggestions. You are the best

  • @notlaw1567
    @notlaw1567 2 ปีที่แล้ว +8

    I would love to see a basic understanding of the theory behind multiplayer games, like connections between server-client and viceversa. It's something I tried to understand on my own but never've been 100% to fully understand it.

  • @NightMareJP99
    @NightMareJP99 2 ปีที่แล้ว +3

    Used Photon for university projects. Personally I think having the game well developed and game mechanics ready is much easier to implement multiplayer later on since the foundation is there to test right on the go. Can't wait to see Codemonkey continue to explore.

  • @Hoofer
    @Hoofer 2 ปีที่แล้ว +3

    I have been using Netcode for Game Objects for the last few weeks and it has been really great to use. I have only had one major issue which requires me to use the development branch, but that fix should be out in the next version release. Lots of good information from this video!

    • @Omnivodeos
      @Omnivodeos 8 หลายเดือนก่อน

      If we game using netcode then we have to manage server or loadbalancer for handling Large audience

  • @ThunderSn1per
    @ThunderSn1per 2 ปีที่แล้ว +3

    You say, of the comparison, "just pick one and learn", I think the biggest question to ask of that would be which one would benefit a game developer more as if you were to pick Netcode for Game Objects and it becomes apparant that it's not up to the task of a larger scale game then you have to invest your time learning Photon/Mirror etc instead after the fact. Which would be the best one to learn "first" so to say in the view of creating potentially larger scale games than Netcode for Game Objects might allow?
    Yes I am aware that if the only limitation as CM has found is the packet size then potentially this answer is actually "personal preference" but as a developer looking at multiplayer I'd like to have some insight for sure :)
    Also congrats on 400k!!

    • @Rahulsingh-theraha
      @Rahulsingh-theraha 2 ปีที่แล้ว

      Photon ,it is just easy to work in and also fast development time and enough tutorial for everything

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      If you have a very specific use case (like you need super high speed high accuracy, or tons and tons of units, or need 100 players, or super accurate network physics) then for that I would recommend building a quick MVP of the scale that you're trying to build.
      When I say "just pick one and learn" is based on the fact that I've heard great things about all those toolsets, so it would seem that for 90% of games any of those tools would be capable.
      So for example if I wanted to turn my TBS game into a multiplayer game I would go with NGO simply because it's the tool I'm currently researching, but I'm pretty confident any of those others would also be capable of doing the job.
      Thanks! It's fun to hit a new round number!

  • @falricthesleeping9717
    @falricthesleeping9717 2 ปีที่แล้ว +1

    Thanks man, really glad that you went through your comments and answered them through this awesome video
    Still not going to work with netcode but I appreciate you as a unity youtuber

  • @unity_with_timoteo
    @unity_with_timoteo 2 ปีที่แล้ว +2

    I hope you do a lobby system in the new series. This is not cover and must game need to split the players into rooms. Thanks Code!

  • @Kakashi42069
    @Kakashi42069 2 ปีที่แล้ว +4

    I would love a multiplayer course from you. Actually am trying to learn game dev from you right now so that way I can put my game idea into life and it's also going to be multiplayer based like an MMORPG (hopefully)

  • @N1ghtR1der666
    @N1ghtR1der666 2 ปีที่แล้ว +2

    thanks for answering my question, I would love to see some testing on what it takes to hit the limits of the new multiplayer code, perhaps in the tutorial your making. Might also touch of what it takes before you should consider moving your game to DOTS

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      Yup I definitely want to do a quick video testing out the limits, seeing how far you can push number of clients or just total amount of networked objects before it stops working

  • @SantaGamerYoutube
    @SantaGamerYoutube 2 ปีที่แล้ว +3

    Great video! I'll be looking more into a smaller scale game, like a 2 player coop game,p2p, without relay.

  • @TheUncutAngel
    @TheUncutAngel 2 ปีที่แล้ว

    People who talk about rollback bother the heck out of me. It's just a philosophy on how information is transfered over the network, but people make it seem like it's an actual networking solution (like netcode for gameobjects, mirror, etc).

  • @jamesderaja
    @jamesderaja 2 ปีที่แล้ว +1

    Great video. It gives us a bit more light on netcode

  • @MarekNijaki
    @MarekNijaki 2 ปีที่แล้ว +2

    Could you do follow up video that explains different type of architectures that should be used for different type of games, eg. Lock step, peer 2 peer, full server authority? Depending on game genre you will probably use different approach, eg FPS, car racing, turn based strategy, so people know what to search more info when they start creating multiplayer for their game?

  • @wakajak8634
    @wakajak8634 2 ปีที่แล้ว +2

    This is useful info to have. Still pondering if I should put in the effort to add multiplayer to my game project.

    • @SantaGamerYoutube
      @SantaGamerYoutube 2 ปีที่แล้ว +3

      He said that it should be done from the start, not in the middle of a project

    • @Rahulsingh-theraha
      @Rahulsingh-theraha 2 ปีที่แล้ว +1

      @@SantaGamerTH-cam but it is possible to do,although ton of refractoring needed

    • @SantaGamerYoutube
      @SantaGamerYoutube 2 ปีที่แล้ว +1

      @@Rahulsingh-theraha True. You would have to remake basically every component though.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +4

      If you're currently in the middle of building a game then it's probably a bit too late to start thinking about multiplayer. Although perhaps you could add a separate smaller multiplayer mode depending on what the game is about.

  • @AstraGamesStudios
    @AstraGamesStudios 2 ปีที่แล้ว +2

    You make so much valuable content! I can't thank you enough!!!

  • @KosteloGR
    @KosteloGR 2 ปีที่แล้ว +1

    It feels strange to see one self on a video! Thanks for the answer!

  • @il35215
    @il35215 11 หลายเดือนก่อน +1

    No one make tutorials about Netcode for Entities. Everyone say that it’s best choice for multiplayer games with big CCU but no one cover that theme. Can you please make tutorial for how to make such dedicated server and pull it to multiplay?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  11 หลายเดือนก่อน

      It's on my to-do list but I know it's a big topic so I need a good chunk of time to dedicate to researching and making a video on it, I was hoping to cover it in January but I'm already busy with some big projects, might be able to get to it in February
      I covered game server hosting here unitycodemonkey.com/video.php?v=IvCVFywNXMc
      So you would make a server build and upload it

  • @captainnoyaux
    @captainnoyaux 2 ปีที่แล้ว +1

    Thanks a lot for your replies and your work !!

  • @holdthetruthhostage
    @holdthetruthhostage 2 ปีที่แล้ว +1

    This is desperately needed because Unreal is so far ahead on multiplayer since it's baked in Unity needs full explanation

  • @MathsPlusGames
    @MathsPlusGames 2 ปีที่แล้ว +4

    Keep it up! Amazing content as always

  • @RamunatorGames
    @RamunatorGames 2 ปีที่แล้ว +1

    I like that you make tutorials about multiplayer i wish there was more multiplayer videos when i started using mirror But thx and i really would appreciate id you made videos about steamworks. There is close to none videos about steamworks and unity intergration

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +1

      Steamworks has a bunch of confidential info so that's why it's tricky to make tutorials on that. Technically the entire backend has a confidential warning although I haven't heard Steam sue anyone for briefly showing it

  • @gr8b8m85
    @gr8b8m85 ปีที่แล้ว +1

    It's a travesty it took them THIS long to get proper native multiplayer solutions up and running. Even lightweight stuff like Mirror was always hacky and complex to work with for simple multiplayer lobbies and instanced matches. Hopefully we see more multiplayer games now though!

  • @thefauron742
    @thefauron742 2 ปีที่แล้ว +2

    thx a lot u help me make my game :D

  • @navi1615
    @navi1615 2 ปีที่แล้ว +6

    Hey @CodeMonkey, one quick question. When you make a multiplayer game you use multiplayer specific things like [Server], [ClientRCP] etc, and the logic it's different of making a singleplayer game. My question is, how do you make a game with multiplayer AND singleplayer. Do you host it for one player? Is that a correct way? I think that the multiplayer thing should be an extension of the singleplayer game, right? What is your view and tips on this? Thank you

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +4

      Yup that is a potentially very tricky topic, which is why a lot of games have a separate game mode for multiplayer vs singleplayer.
      The simplest approach would indeed be exactly like that, you make a local host and all the multiplayer logic will run locally, that would work and would be invisible to the player.
      A more complex approach would be separating everything, so you would use different components when playing singleplayer vs multiplayer, possibly with a ton of interfaces or making the multiplayer classes extend the singleplayer classes.

    • @navi1615
      @navi1615 2 ปีที่แล้ว

      @@CodeMonkeyUnity I dont know if extending would work since the variables would be on the parent (singleplayer) and they would propably need a syncvar but yeah n.n

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +1

      ​@@navi1615 You could have the extended class using NetworkVariables then listen to when those change and apply those changes to the base singleplayer variables. Which yes means you basically need double the variables, one type on the base singleplayer class, and another just like it on the extended multiplayer class.

    • @navi1615
      @navi1615 2 ปีที่แล้ว

      @@CodeMonkeyUnity I will give it a try! Thank you for everything!

  • @abduzzami
    @abduzzami ปีที่แล้ว +1

    Is Photon(free) is good if i want to make a multiplayer game with mode tdm. If not then which network solution should i use?

  • @bluzenkk
    @bluzenkk 2 ปีที่แล้ว

    If you like questions, here's one for ya~~
    Can you do a video on Unity service on the topic of A/B Testing for Unity.

  • @benpielstick
    @benpielstick 2 ปีที่แล้ว +2

    I would really like to see if the BR 200 player Fusion demo really works. The video only shows 3 players.

  • @457Deniz457
    @457Deniz457 2 ปีที่แล้ว

    Thanks a lot for this video and answers❗😊

  • @devtherapy4624
    @devtherapy4624 2 ปีที่แล้ว

    Please if you are doing a tutorial on multiplayer please add player selection.
    I have troubles doing this

  • @WattDesigns
    @WattDesigns ปีที่แล้ว

    Great video!

  • @sudhansubalasahoo
    @sudhansubalasahoo 2 ปีที่แล้ว +2

    Congo on 400k

  • @RoGiftRBLX
    @RoGiftRBLX 2 ปีที่แล้ว

    Congrats on 400k subs! :)

  • @theplaymakerno1
    @theplaymakerno1 2 ปีที่แล้ว

    Photon Fusion is currently the best solution

  • @Steve-gi2yj
    @Steve-gi2yj ปีที่แล้ว

    really dumb question, so netcode would replace Photon? also would netcode work if I have total of 5 players in a game? it is a small scale game, and would be 2d, or would it be best with photon for 3 or more players?

  • @watercat1248
    @watercat1248 2 ปีที่แล้ว +1

    i have few questions Netcode for Game
    1. dose the Netcode for Game Objects have lan option ?
    2. i will able to make arena type off games up to 10 or 20 player maximum with the Netcode ?
    the game im trying to create is deathmatch fps like half life, quake ect i know for sure the game im try to create need at least 2 player in the order to be playable the also need host and client system and lan game is nursery,
    i have plan to add an online play as well but to add lan game is more important and as for the online that i will probably add in the future i will probably by only in the order to by have list off games for other ip and in the order to find games that is not in the same ip and maybe i few stuff like content in the same server with your friend and maybe keeping some extra stuff like items and stuff like that and yes the game im try to is 100% pvp
    Stuff that im sure is necessary
    synchronization
    1. keep player postion
    2. keep moving objects and projectiles
    3. Player animation
    host & client
    4. having a host and client system
    5. game customized on the host
    6. having a lan game in the order to by able to play with your friends if you have the same ip even wean you don't have internet connection
    7. at least 10 player maximum for each Mach

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      Yes you can connect directly to a local IP for a LAN game.
      Yes 20 players should be doable, but keep in mind it's not just the amount of players, it's the total amount of networked objects. If you have just 2 players but 100 really complex objects syncing a ton of data then it will probably cause problems.
      For that type of fast paced game I would highly recommend you build a quick prototype, those kinds of games have very specific challenges (like client prediction) which can be quite tricky to achieve.

    • @watercat1248
      @watercat1248 2 ปีที่แล้ว

      ​@@CodeMonkeyUnity ok i understand the stuff that i will probably need synchronization is
      my game have a lot object Hoever i have plan to add objects in mind of Hover meny off thos objects and systems don't syncing at all the stuff that need syncing is stuff player postion and rotseion, animation, score Manger, projectiles, and moving objects and player health
      the other stuff like ,static objects, optimization systems, effe, ect don't need synchronization one other system that does not need syncing is ghost camera i dont if add this system in my game yet

  • @MadoLeoss
    @MadoLeoss 3 หลายเดือนก่อน

    still waiting for the netcode for entities tutorial, would be good if you showed of to self-host it instead of using multiplay

  • @teknikoscave
    @teknikoscave 2 ปีที่แล้ว

    LiteNetLib is superior imo. At least for UDP in an MMO environment.

  • @ekzac
    @ekzac 2 ปีที่แล้ว

    "Pay as you go" can be read as "Be punished as you make success".

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      That's a very strange mindset, I wish I was "punished" by having my game suddenly have 1 million players. It's literally a win win scenario, if your game isn't successful then you don't pay anything, if Unity helps you achieve success they benefit from your success.

    • @ekzac
      @ekzac 2 ปีที่แล้ว

      ​@@CodeMonkeyUnity May be, may be it is some kind of trauma that make me feel unsafe. It always depends on how much it will cost. I heard of some people who contracted a service in the "pay as you go" modality (not a percentage, a fixed amount), made a little mistake in the calculations and code, which extrapolated their tier limit and saw the error at the end of the month, in the form of $$$$$. Of course it was their mistake, but I think it's unfair to blame only them. At least a small percentage had to do with the chosen model.

    • @ekzac
      @ekzac 2 ปีที่แล้ว

      @@CodeMonkeyUnity Of course their limits are very generous. 50 CCU is a lot!

  • @at930pmgames
    @at930pmgames 2 ปีที่แล้ว

    I made a car 2d racing game with photon pun 2 and playfab, now photon have Fusion which is supposed to be better.
    My issue with photon was synchronizing players cars in a segment of the track where they do a loop like a rollercoaster. Issue happens cause im synching rigidbodies and not transforms, that also doing so cause cars uses wheeljoints and using transform synching doesnt work well.

  • @flaschenzuglp9994
    @flaschenzuglp9994 2 ปีที่แล้ว +1

    Nice video. Cost for relay is way to high in my opinion(if you have a small successful game). As I know is Steam + eos free (relay part) but the ngo stuff has no real support for now... I know there are some projects but if you want to target Android + PC no luck. If anyone know a good alternative please share it with me :)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +2

      Does it seem high? Looking at my own game Hyper Knights which sold decently well, the peak CCU was 300 just on the first month, so if that game was entirely multiplayer it would mean I would have had to pay just $40 on launch month. That does not seem high at all to me, the game certainly sold more than enough copies to offset that tiny cost.

  • @hemlama111
    @hemlama111 ปีที่แล้ว

    photo vs netcode which is better?

  • @kmaky
    @kmaky 10 หลายเดือนก่อน

    Will you do a netcode for entities tutorial?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  10 หลายเดือนก่อน

      It's been on my to-do list for ages but havent been able to get to it yet

  • @thatonerhyguy5512
    @thatonerhyguy5512 2 ปีที่แล้ว +1

    I know you're planning on adding Hexagons to your TBS guide, but will you add a multi-player guide to that as well or keep it as a separate package?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +1

      Not sure, I still have to research it to see if it's doable in a good way. But if it is doable then I will add it as a free expansion

  • @MalikenGD
    @MalikenGD 2 ปีที่แล้ว +1

    You just confirmed a sale for your course by saying you're converting it to hex AND you're going to try adding multiplayer.

  • @rucesocial
    @rucesocial 2 ปีที่แล้ว

    Very good topic :)

  • @TennessseTimmy
    @TennessseTimmy 2 ปีที่แล้ว

    please use youtube dark theme 🙏

  • @infernape28
    @infernape28 ปีที่แล้ว

    What is netcode for entities? Can you explain the differences?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  ปีที่แล้ว

      It's netcode meant to work with DOTS Entities unitycodemonkey.com/video.php?v=H7zAORa3Ux0
      As opposed to Netcode for Game Objects which is meant to work with Game Objects.

  • @josejavierjorge3994
    @josejavierjorge3994 2 ปีที่แล้ว

    I have a life or death question, I will love you all my life if you answer it. Look, I'm a novice developer but I'm making together with a group a Genshin style gacha game (but without open world) it will be instantiated but with the possibility to explore and collect chests and items. What is the recommended method for such an idea? Is it possible to do this with NetCode? Would Photon be better? It is a question that has been haunting me, I also want to know how much money it could cost me and if there is a cheaper way to do it if it costs a lot.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +2

      Depends on the level of players and networked objects. If you want 100 players then Photon is best. If you want 10 players then NGO should work perfectly.
      Cost depends on server hosting, not the netcode library

    • @josejavierjorge3994
      @josejavierjorge3994 2 ปีที่แล้ว

      @@CodeMonkeyUnity Sorry to bother you again, but the idea is for everyone to play single player connected to the internet in general, but have the option to play multiplayer with a maximum of 3-4 people and do some things like exploration or farming.

  • @Deymser
    @Deymser 2 ปีที่แล้ว +1

    As always thanks for researching! I'm still uncertain about the pricing of relay with bandwidth. Do you have any numbers a CCU uses in one month?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +3

      You can check out Steam Charts or Steam DB to see CCUs for any game
      For example one of my games, Hyper Knights, hit 300 CCU for a day on launch month, so if it was entirely multiplayer I would have had to pay $40 on launch month which given how many copies it sold it seems like a very reasonable cost.
      Bandwidth is really going to depend on how you implement it, no way to guess just by looking at a game.

  • @Srjames094
    @Srjames094 2 ปีที่แล้ว +1

    I am building a drift game, and I have a problem, which is I have a car on the client chasing another car from the server at 50km/h on the client it is very close and on the server it is quite far away because of the ping, teaches how to fix the "client predict" problem with netcode so that both are in the same position regardless of ping, I can't find anyone to explain how to program.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +1

      Yes you need client prediction, basically the code needs to guess based on the last packet it received where the car is right now.
      So if the last packet was 1 second ago you need to move the car forward by 1 second in order to predict where the car is right now

  • @lykas-s
    @lykas-s 2 ปีที่แล้ว

    Your video was super helpful, we implemented Netcode for Game Objects with your tutorial in our project and it works wonderfully. Do you know a free solution for Voice Chat? We found Dissonance but it's for a school project and we are all broke af.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      I'm glad it was helpful! Sorry I'm not familiar with voice solutions, only know about Vivox but the pricing page doesn't seem to have been updated so there's no mention of what the free tier entails.

  • @duelsoldier3048
    @duelsoldier3048 2 ปีที่แล้ว +1

    NetCode for game objects does not have automatic host migration which means if the host leaves every other play is disconnected which is game breaking for the other players. When you would be using dedicated servers the server is the host so does not have this issue but it has packet issues as you said when initialising a new client. If you were making a bigger multiplayer game with dedicated servers then photon is so much better than NetCode for game objects in every way. The other tools surrounding NetCode for game objects are useful such as multiplay and matchmaking, but I don’t see any reason at all to why you would use NetCode for game objects for any multiplayer game when it is so flawed.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +2

      It really depends on what game you're making as to whether that is a serious flaw or not.
      Building something like Overcooked or Among Us where each game session is pretty short, in that type of game having a host randomly disconnect wouldn't be a big deal.
      If you're making something more persistent like Don't Starve Together then perhaps that could be a serious flaw or perhaps not depending on how often you auto-save.
      Also you don't need to use NGO in order to use Mutliplay or Matchmaking, those services are independent of the networking stack. You can use those with Photon/Mirror

    • @CameronWills
      @CameronWills 2 ปีที่แล้ว

      You could code something around this, like having the client player store the game state, and then recreate a lobby as a new host and restore the game state

  • @EnderElohim
    @EnderElohim 2 ปีที่แล้ว

    how it is compare to Mirror

  • @marveII0us
    @marveII0us 2 ปีที่แล้ว

    Interesting

  • @yours_indie_game_dev
    @yours_indie_game_dev ปีที่แล้ว

    i watched your other tutorial saying in the build you insert your local ip address so that you can host the game with other laptops on the same lan, but what if i wanted to host the game from that other laptop, or diffrent person on the network and i cant keep gooing to the editer to edit the ip address for each?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  ปีที่แล้ว

      For LAN you would just give the player an Input window for then to input the IP and set that through code unitycodemonkey.com/video.php?v=4n6RT805rCc

  • @yehyabakour8332
    @yehyabakour8332 2 ปีที่แล้ว

    Hey ,I am making a wifi hotspot local multiplayer PvP for pc and android (crossplay if possible)
    Can i use netcode for that?
    if yes can you give me some general directions and guidelines on how to do it because i searched alot on this with no clear (and free😅) result

  • @TheJokerCard21
    @TheJokerCard21 ปีที่แล้ว

    Would it work for a zombie survival game based on waves? With max 4 players in one lobby

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  ปีที่แล้ว

      The main question is how many objects/data you are syncrhonizing, it's not just the number of players that matters. If you're doing a game like vampire survivors with thousands of enemies it might require some optimization

  • @AmAs847
    @AmAs847 9 หลายเดือนก่อน

    Hi
    How to change host ownership without disconnecting players in netcode and relay
    In this case when host player disconnect i want to change host owner without make all players rejoin
    Please help

  • @tofaani
    @tofaani 2 ปีที่แล้ว

    👍

  • @thangvu6627
    @thangvu6627 2 ปีที่แล้ว

    Hi, I am developing TPS online game. I am using websocket to send and receive data from server to client. How I can use Netcode for my game?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      Stay tuned for the tutorial tomorrow.
      Although are you using Websocket because you specifically want to make a WebGL build? The default Unity Transport doesn't work on WebGL, requires a different transport docs-multiplayer.unity3d.com/netcode/current/about

    • @thangvu6627
      @thangvu6627 2 ปีที่แล้ว

      ​@@CodeMonkeyUnity My game run on mobile. I send custom data to server and server send to other player

  • @Finalldrace
    @Finalldrace 2 ปีที่แล้ว

    Are the 50 CCU free for Relay Server only while Connecting if you Use Peer to Peer?
    (Or assigned as Long as the Session between the Player ist Running)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      It's only while you're using the relay server, CCU is concurrent users, so 50 players can be playing your game in multiplayer at the same time for free.
      You can have thousands of players that own your game, it will still be free if only 50 are playing at the same time.
      If they are just standing with the game opened in the main menu and there's no connection active then they are not counted.

  • @hunterxhunter6392
    @hunterxhunter6392 2 ปีที่แล้ว

    How can I Add Mobile Inputs On FPS Games??

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      Look into the Input System unitycodemonkey.com/video.php?v=Yjee_e4fICc
      Or see how they handled touch in the Starter Assets unitycodemonkey.com/video.php?v=jXz5b_9z0Bc

    • @hunterxhunter6392
      @hunterxhunter6392 2 ปีที่แล้ว

      Now i have an other problem in multiplayer his double thé UI and give me an error how Can i hide UI if his Line on the other player and show UI if his Mine (I mean UI joystick & Buttons ) u know what i talk with u i'm stuck 🥺

    • @hunterxhunter6392
      @hunterxhunter6392 2 ปีที่แล้ว

      Plz help me to complet this game i'm cherche for all vedios and i don't have any way to work this si if u Can help i will thx all my life 😍

  • @FabCubeZ
    @FabCubeZ 2 ปีที่แล้ว

    @code monkey did you ever feel to quit unity and changing to another game engine

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว

      I have never had a game idea that I could not build with Unity so no, until that time happens there's no reason to switch

    • @FabCubeZ
      @FabCubeZ 2 ปีที่แล้ว

      @@CodeMonkeyUnity just like me

  • @sagarhm2237
    @sagarhm2237 ปีที่แล้ว

    Is there any getting free netwoking multplayer server that i can serve in aws , im ready to pay for cloud aws ec2 but i dont want to pay for netwjing server for mulpayer is there any option like that plzz help me out

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  ปีที่แล้ว +1

      What do you mean by that? Netcode for Game Objects is free, the dedicated server is the only thing you need to pay for (if you're not using Relay) there's nothing else that requires payment.

    • @sagarhm2237
      @sagarhm2237 ปีที่แล้ว

      @@CodeMonkeyUnity dedicated server mean like photon,unity like that I need to be purchase at end of the day. The dedicated server can be host on ec2 or any cloud? Ok thanks

  • @asmr_codster
    @asmr_codster 2 ปีที่แล้ว

    Do you get most of your earnings from donates? Or maybe from courses? I ask because I don't know how people can make normal living in gamedev nowadays.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  2 ปีที่แล้ว +1

      Nowadays it's mostly from courses yes. TH-cam doesn't pay much, a video with 10k views makes about $20 so it's much easier for just 1 person to buy one course
      My last game was in 2019, game revenue drops over time so that's why nowadays it's primarily courses unitycodemonkey.com/video.php?v=e7cwJqvq_Fo

    • @asmr_codster
      @asmr_codster 2 ปีที่แล้ว

      @@CodeMonkeyUnity thanks for the answer!

  • @illsaveus
    @illsaveus 2 ปีที่แล้ว

    Just use photon

  • @Lucky_programmer_Abhi
    @Lucky_programmer_Abhi 2 ปีที่แล้ว

    Ha ha ha

  • @copperdevs
    @copperdevs 2 ปีที่แล้ว

    Interesting