Answering your Unity Multiplayer Questions (Netcode for Game Objects)

  Рет қаралды 36,061

Code Monkey

Code Monkey

Күн бұрын

🔴 COMPLETE Unity Multiplayer Tutorial (Netcode for Game Objects) • COMPLETE Unity Multipl...
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
👇 Click on Show More
🎮 Get my Steam Games unitycodemonkey.com/gamebundle
docs-multiplayer.unity3d.com/
blog.unity.com/games/multipla...
🔴 RELATED VIDEOS 🔴
Unity OFFICIAL Multiplayer is FINALLY HERE! • Unity OFFICIAL Multipl...
What is Unity Gaming Services? Free Unity Multiplayer? Backend? Monetization? • Free Unity Multiplayer...
What is the STATE of Unity DOTS? Released? Preview? Abandoned? • What is the STATE of U...
Make your game UNIQUE with Cloud Game Mechanics! (Azure FREE for most Indie Game Devs!) • Learn Azure Basics - A...
💬 It's finally here! Unity Official Multiplayer is fully released!
With that you asked a bunch of questions so here are my answers based on my research.
Stay tuned for a full tutorial coming soon!
0:00 Intro
0:19 What is the limitation for small scale games?
1:48 Visual scripting
2:17 DOTS multiplayer
2:40 Addition to Turn-Based Strategy 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
📝 Some Links are Affiliate links which means it costs the same to you and I get a nice commission.
🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!
✅ store.steampowered.com/app/12...
If you have any questions post them in the comments and I'll do my best to answer them.
🔔 Subscribe for more Unity Tutorials / @codemonkeyunity
See you next time!
📍 Support on Patreon / unitycodemonkey
🎮 Grab the Game Bundle at unitycodemonkey.com/gameBundl...
📝 Get the Code Monkey Utilities at unitycodemonkey.com/utils.php
#unity3d #gamedev #multiplayer
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 8 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
You can see my games at www.endlessloopstudios.com
--------------------------------------------------------------------
- Other great Unity channels:
Unity - / unity3d
Brackeys - / brackeys
Dani - / @danidev
Jabrils - / @jabrils
BlackthornProd - / @blackthornprod
Sykoo - / sykootv
Jason Weimann - / @unity3dcollege
Jonas Tyroller - / @jonastyroller
--------------------------------------------------------------------
- Website: unitycodemonkey.com/
- Twitter: / unitycodemonkey
- Steam: store.steampowered.com/develo...

Пікірлер: 133
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
❤ Watch my FREE Complete Multiplayer Course kzfaq.info/get/bejne/bc2cdtZ3nszaY6c.html
@geri4367
@geri4367 Жыл бұрын
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
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks for the kind words Geri!
@RobinDoesUnity
@RobinDoesUnity Жыл бұрын
Thank you for the incredibly high quality of your content. Your Unity tutorials helped me a lot in the past years.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Many thanks for the super thanks! I'm glad the videos have helped you!
@progCan
@progCan Жыл бұрын
OMG 50 EURO?!?! INSANE SUPPORT DUDE! 😃
@Sim2322
@Sim2322 Жыл бұрын
Forget KZfaq, 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 Жыл бұрын
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.
@jamesmillerjo
@jamesmillerjo Жыл бұрын
Why you think youtube video should be 10mins?
@MIKE-MURPHY
@MIKE-MURPHY Жыл бұрын
@이름 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 Жыл бұрын
Just make it a playlist. 🤦‍♀️
@_GhostMiner
@_GhostMiner Жыл бұрын
@@jamesmillerjo because it used to be that to get as many ads as possible you had to make the video at least 10 minutes.
@NachitenRemix
@NachitenRemix Жыл бұрын
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
@tomtomkowski7653
@tomtomkowski7653 Жыл бұрын
2:40 - adding multiplayer with an authoritative server to your turn-based strategy game would be awesome!
@striverfor7628
@striverfor7628 Жыл бұрын
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 Жыл бұрын
Thanks for that! I'm super busy working on tons of videos so didn't have time to make timestamps
@striverfor7628
@striverfor7628 Жыл бұрын
@@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
@falricthesleeping9717
@falricthesleeping9717 Жыл бұрын
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
@notlaw1567
@notlaw1567 Жыл бұрын
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.
@AstraGamesStudios
@AstraGamesStudios Жыл бұрын
You make so much valuable content! I can't thank you enough!!!
@NightMareJP99
@NightMareJP99 Жыл бұрын
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.
@MathsPlusGames
@MathsPlusGames Жыл бұрын
Keep it up! Amazing content as always
@SantaGamerYoutube
@SantaGamerYoutube Жыл бұрын
Great video! I'll be looking more into a smaller scale game, like a 2 player coop game,p2p, without relay.
@Hoofer
@Hoofer Жыл бұрын
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 4 ай бұрын
If we game using netcode then we have to manage server or loadbalancer for handling Large audience
@captainnoyaux
@captainnoyaux Жыл бұрын
Thanks a lot for your replies and your work !!
@Kakashi42069
@Kakashi42069 Жыл бұрын
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)
@jamesderaja
@jamesderaja Жыл бұрын
Great video. It gives us a bit more light on netcode
@457Deniz457
@457Deniz457 Жыл бұрын
Thanks a lot for this video and answers❗😊
@ThunderSn1per
@ThunderSn1per Жыл бұрын
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 Жыл бұрын
Photon ,it is just easy to work in and also fast development time and enough tutorial for everything
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
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!
@thefauron742
@thefauron742 Жыл бұрын
thx a lot u help me make my game :D
@N1ghtR1der666
@N1ghtR1der666 Жыл бұрын
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 Жыл бұрын
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
@unity_with_timoteo
@unity_with_timoteo Жыл бұрын
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!
@MarekNijaki
@MarekNijaki Жыл бұрын
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?
@TheUncutAngel
@TheUncutAngel Жыл бұрын
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).
@WattDesigns
@WattDesigns Жыл бұрын
Great video!
@rucesocial
@rucesocial Жыл бұрын
Very good topic :)
@RoGiftRBLX
@RoGiftRBLX Жыл бұрын
Congrats on 400k subs! :)
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks!
@wakajak8634
@wakajak8634 Жыл бұрын
This is useful info to have. Still pondering if I should put in the effort to add multiplayer to my game project.
@SantaGamerYoutube
@SantaGamerYoutube Жыл бұрын
He said that it should be done from the start, not in the middle of a project
@Rahulsingh-theraha
@Rahulsingh-theraha Жыл бұрын
@@SantaGamerKZfaq but it is possible to do,although ton of refractoring needed
@SantaGamerYoutube
@SantaGamerYoutube Жыл бұрын
@@Rahulsingh-theraha True. You would have to remake basically every component though.
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
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.
@navi1615
@navi1615 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
​@@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 Жыл бұрын
@@CodeMonkeyUnity I will give it a try! Thank you for everything!
@KosteloGR
@KosteloGR Жыл бұрын
It feels strange to see one self on a video! Thanks for the answer!
@RamunatorGames
@RamunatorGames Жыл бұрын
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 Жыл бұрын
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
@sudhansubalasahoo
@sudhansubalasahoo Жыл бұрын
Congo on 400k
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
Thanks!
@gr8b8m85
@gr8b8m85 Жыл бұрын
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!
@holdthetruthhostage
@holdthetruthhostage Жыл бұрын
This is desperately needed because Unreal is so far ahead on multiplayer since it's baked in Unity needs full explanation
@benpielstick
@benpielstick Жыл бұрын
I would really like to see if the BR 200 player Fusion demo really works. The video only shows 3 players.
@marveII0us
@marveII0us Жыл бұрын
Interesting
@bluzenkk
@bluzenkk Жыл бұрын
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.
@at930pmgames
@at930pmgames Жыл бұрын
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.
@Deymser
@Deymser Жыл бұрын
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 Жыл бұрын
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.
@thatonerhyguy5512
@thatonerhyguy5512 Жыл бұрын
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 Жыл бұрын
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
@il35215
@il35215 6 ай бұрын
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 6 ай бұрын
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
@abduzzami
@abduzzami Жыл бұрын
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?
@devtherapy4624
@devtherapy4624 Жыл бұрын
Please if you are doing a tutorial on multiplayer please add player selection. I have troubles doing this
@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?
@yehyabakour8332
@yehyabakour8332 Жыл бұрын
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
@hemlama111
@hemlama111 Жыл бұрын
photo vs netcode which is better?
@EnderElohim
@EnderElohim Жыл бұрын
how it is compare to Mirror
@lucasortiz5650
@lucasortiz5650 Жыл бұрын
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 Жыл бұрын
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.
@c3i
@c3i Жыл бұрын
👍
@kmaky
@kmaky 6 ай бұрын
Will you do a netcode for entities tutorial?
@CodeMonkeyUnity
@CodeMonkeyUnity 6 ай бұрын
It's been on my to-do list for ages but havent been able to get to it yet
@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
@AmAs847
@AmAs847 5 ай бұрын
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
@Srjames094
@Srjames094 Жыл бұрын
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 Жыл бұрын
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
@Finalldrace
@Finalldrace Жыл бұрын
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 Жыл бұрын
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.
@watercat1248
@watercat1248 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
​@@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
@theplaymakerno1
@theplaymakerno1 Жыл бұрын
Photon Fusion is currently the best solution
@flaschenzuglp9994
@flaschenzuglp9994 Жыл бұрын
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 Жыл бұрын
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.
@giacomociaramella6908
@giacomociaramella6908 Жыл бұрын
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
@MalikenGD
@MalikenGD Жыл бұрын
You just confirmed a sale for your course by saying you're converting it to hex AND you're going to try adding multiplayer.
@TennessseTimmy
@TennessseTimmy Жыл бұрын
please use youtube dark theme 🙏
@duelsoldier3048
@duelsoldier3048 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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
@teknikoscave
@teknikoscave Жыл бұрын
LiteNetLib is superior imo. At least for UDP in an MMO environment.
@josejavierjorge3994
@josejavierjorge3994 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
@@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.
@thangvu6627
@thangvu6627 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
​@@CodeMonkeyUnity My game run on mobile. I send custom data to server and server send to other player
@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.
@FabCubeZ
@FabCubeZ Жыл бұрын
@code monkey did you ever feel to quit unity and changing to another game engine
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
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 Жыл бұрын
@@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 Жыл бұрын
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
@ekzac
@ekzac Жыл бұрын
"Pay as you go" can be read as "Be punished as you make success".
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
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 Жыл бұрын
​@@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 Жыл бұрын
@@CodeMonkeyUnity Of course their limits are very generous. 50 CCU is a lot!
@hunterxhunter6392
@hunterxhunter6392 Жыл бұрын
How can I Add Mobile Inputs On FPS Games??
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 😍
@asmr_codster
@asmr_codster Жыл бұрын
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 Жыл бұрын
Nowadays it's mostly from courses yes. KZfaq 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 Жыл бұрын
@@CodeMonkeyUnity thanks for the answer!
@illsaveus
@illsaveus Жыл бұрын
Just use photon
@CodeMonkeyUnity
@CodeMonkeyUnity Жыл бұрын
That is indeed an option
@Lucky_programmer_Abhi
@Lucky_programmer_Abhi Жыл бұрын
Ha ha ha
@copperdevs
@copperdevs Жыл бұрын
Interesting
COMPLETE Unity Multiplayer Tutorial (Netcode for Game Objects)
1:04:05
Steam EXPERT teaches you Game Marketing for SUCCESS!
52:22
Code Monkey
Рет қаралды 45 М.
Stay on your way 🛤️✨
00:34
A4
Рет қаралды 8 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 68 МЛН
Unity Multiplayer in 3 minutes
3:01
Rootbin
Рет қаралды 3,9 М.
Create a server for your Unity game using .NET Core
24:51
Tarodev
Рет қаралды 70 М.
Multiplayer Game Architecture in Unity
15:21
Shrine
Рет қаралды 151 М.