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 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
Forget UA-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.
@이름 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.
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
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.
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.
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!
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!!
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!
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
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?
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).
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
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
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)
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?
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
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
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.
@@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
@@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.
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.
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!
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
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
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.
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.
@@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.
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.
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?
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
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.
@@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
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
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.
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
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
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.
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
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
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.
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 :)
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.
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)
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.
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
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.
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.
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.
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
@@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.
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?
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
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
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 🥺
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.
Nowadays it's mostly from courses yes. UA-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
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
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.
@@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
❤ Watch my FREE Complete Multiplayer Course ua-cam.com/video/7glCsF9fv3s/v-deo.html
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
Thanks for that! I'm super busy working on tons of videos so didn't have time to make timestamps
@@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
Forget UA-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.
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.
Why you think youtube video should be 10mins?
@이름 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.
Just make it a playlist. 🤦♀️
@@marksmithcollins because it used to be that to get as many ads as possible you had to make the video at least 10 minutes.
Thank you for the incredibly high quality of your content. Your Unity tutorials helped me a lot in the past years.
Many thanks for the super thanks! I'm glad the videos have helped you!
OMG 50 EURO?!?! INSANE SUPPORT DUDE! 😃
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
Thanks for the kind words Geri!
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
2:40 - adding multiplayer with an authoritative server to your turn-based strategy game would be awesome!
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.
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.
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!
If we game using netcode then we have to manage server or loadbalancer for handling Large audience
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!!
Photon ,it is just easy to work in and also fast development time and enough tutorial for everything
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!
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
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?
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).
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
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
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)
You make so much valuable content! I can't thank you enough!!!
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?
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
Great video! I'll be looking more into a smaller scale game, like a 2 player coop game,p2p, without relay.
Great video. It gives us a bit more light on netcode
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!
Thanks a lot for your replies and your work !!
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
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.
@@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
@@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.
@@CodeMonkeyUnity I will give it a try! Thank you for everything!
This is useful info to have. Still pondering if I should put in the effort to add multiplayer to my game project.
He said that it should be done from the start, not in the middle of a project
@@SantaGamerUA-cam but it is possible to do,although ton of refractoring needed
@@Rahulsingh-theraha True. You would have to remake basically every component though.
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.
Keep it up! Amazing content as always
It feels strange to see one self on a video! Thanks for the answer!
This is desperately needed because Unreal is so far ahead on multiplayer since it's baked in Unity needs full explanation
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!
I would really like to see if the BR 200 player Fusion demo really works. The video only shows 3 players.
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
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
thx a lot u help me make my game :D
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?
Congo on 400k
Thanks!
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.
Thanks a lot for this video and answers❗😊
Please if you are doing a tutorial on multiplayer please add player selection.
I have troubles doing this
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?
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
photo vs netcode which is better?
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?
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.
"Pay as you go" can be read as "Be punished as you make success".
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.
@@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.
@@CodeMonkeyUnity Of course their limits are very generous. 50 CCU is a lot!
Congrats on 400k subs! :)
Thanks!
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.
Great video!
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?
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
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.
@@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
still waiting for the netcode for entities tutorial, would be good if you showed of to self-host it instead of using multiplay
Will you do a netcode for entities tutorial?
It's been on my to-do list for ages but havent been able to get to it yet
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
Photon Fusion is currently the best solution
LiteNetLib is superior imo. At least for UDP in an MMO environment.
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.
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
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
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.
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
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
You just confirmed a sale for your course by saying you're converting it to hex AND you're going to try adding multiplayer.
What is netcode for entities? Can you explain the differences?
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.
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 :)
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.
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)
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.
how it is compare to Mirror
Would it work for a zombie survival game based on waves? With max 4 players in one lobby
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
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.
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.
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.
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
@@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.
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?
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
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?
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
@@CodeMonkeyUnity My game run on mobile. I send custom data to server and server send to other player
👍
Very good topic :)
please use youtube dark theme 🙏
How can I Add Mobile Inputs On FPS Games??
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
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 🥺
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 😍
@code monkey did you ever feel to quit unity and changing to another game engine
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
@@CodeMonkeyUnity just like me
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.
Nowadays it's mostly from courses yes. UA-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
@@CodeMonkeyUnity thanks for the answer!
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
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.
@@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
Interesting
Just use photon
That is indeed an option
Ha ha ha
Interesting