Code Monkey, I want to say a HUGE thank you!!! I'm making my first multiplayer game, and I don't have any experience with network related stuff like servers, IPs, etc... And your videos covering UGS have been super helpful! When I learn about a multiplayer related terminology like relay, lobby, etc...and I make a research on it, your videos pop up. Your channel is like a big library that has a vast collection of unity knowledge and wisdom. No other channel has that, not even Brackeys or even Unity. If I actually finish this game(still very likely that I'll finish it even though it's a DOTS game), I'll credit you. I really appreciate you man
Many thanks for the super thanks! This was pretty tricky to research since there's a bunch of gaps in the documentation so I really hope it helps people!
Thank you so much for learning and sharing your knowledge with us 🙏🏼. I love how you cover every detail of the process, especially the potential issues we may face.
Great timing....I am just completing the Lobby creation section in the multiplayer course and you had published the dedicated server hosting video...Thanks for all the help you have provided.
I'm glad you are creating some resources for this. The documentation is extremely sparse and I struggled for too long understanding the necessary components to achieve what I wanted, especially between the Manual and APIs (I was livid that APIs for working with server infrastructure were completely missing from anywhere in the manual. That's an incredibly important thing to just leave out, like ok you can start a server by clicking "Start Server" but no one ever in the history of server infrastructure is going to run their game by manually starting their servers every time lol). I'm sure many more developers will find this video extremely useful.
Yeah it took me quite a lot of researching and trial and error to figure all this out, I definitely wish this video existed when I started learning heh
Super video ! I might be wrong but I find Multiplay super expensive if you let it run 24/24h. (VPS' seems way cheaper but that depends on your usage) Be careful if you use any unity gaming services it starts the timer for the free credits for multiplay (found out the hard way)
I'm not too familiar with all the options that exist so really no idea how expensive/cheap this is compared to running your own on AWS/Azure. All I can say is that for testing for this video I started maybe about 30 servers, maybe total uptime about 10 hours (not all at once, so not 30 * 10) and my final cost is $2, no clue how that would scale to a published game.
@@CodeMonkeyUnity yeah but you are an experienced unity developer. imagine some new dev developing a game during 1 year or more, testing multiplayer during that time. it gets expensive, especially when the dev doesnt live in europe/usa and dollar isnt cheap
Great video and thanks for making guides on new features and systems! A quick question for the people who have experience with the service - what does Unity offer as part of the free tier plan? Is there a free tier anyway? 🤔
I don't get it. Why everyone says making a multiplayer game is not worth it because setting up network is difficult and expensive when it's this simple? Is there a catch?
It's always more difficult than a singleplayer game since you have to build all the same things of a singleplayer game and then add multiplayer on top. But yes thanks to the tools that exist nowadays making something multiplayer isn't the huge challenge it once was.
Hi, thank you for making such informative videos. I have question: can I use 1 server to run multiple lobbies? And have separate game scene for each lobby? What should I learn to implement such logic?
Hi, a few questions I'm curious about; - Can we do peer to peer connection with netcode for entities? Without needing relay. So a player would be host and the rest of the users clients. - Can we just get a few aws ec2 instances and use them as our fleet, create server allocations on that? For either netcode for gameobjects or netcode for entities. - Are there any competitors you know of that compares to Multiplay?
You can indeed do direct P2P with NGO without Relay, you just need to manually set the IP of the Host and make sure the Host accepts the connection. The Relay just helps bypass issues with firewalls and port forwarding. You can make an AWS server hosting the dedicated server yes, NGO doesn't care where you host the server. But if you take that route you need to handle all the server fleet management logic yourself. I'm not sure of other tools just like Multiplay, but I'm guessing Unreal probably has something in their services list.
would you recommend this to a small indie dev ? idk about the pricing of this. lets say i want to make an mmo with like a 1000-2000 ccu, what would be the best option ? thanks for the tutorials
I'm not 100% sure but I believe that Max refers to physical servers which depending on the resource usage of your servers they can support many or not many virtual servers. Note how all the Available servers have the same IP so I assume all of those are hosted in a single physical dedicated server.
I dealt with the clientrpc issue u mentioned all day today 😂 unity is updating the clientrpc and serverrpcs soon to be more generic calls with something to pass through instead. Idk maybe it will make it less topsy-turvy.
Thanks for this info about ClientRpc and ServerRpc - because I just tested dedicated build for my game and it was behaving oddly. I looked a little into but then put it aside as I needed to focus on something more important. Now while eating lunch I watched this video and you just saved me from HOURS/DAYS of troubleshooting to figure this out! NGO should for sure log something out, just like they do in other cases where you try and set a server only NetworkVariable etc. It make sense, maybe, that ClientRpc isn't running on a SERVER - but ServerRpc? Why the hell is that not running on a Server...its a Server you know :P Else they should have called it ClientRpc and HostRpc. Really odd - but very happy I know this now, will make it a lot easier to refactor so it works.
@@CodeMonkeyUnity Yeah I experienced the problem right away with dedicated, but didn't spend time to look into it. Then I was watching this video as part of research. So yeah you for sure saved me hours of work/research. Afterwards when researching why it is made like this I also ended up on your thread on the Unity forum on the topic :D
so here for each match ,a server will be allocated then there will be a lots of servers or should i make a server build to handling more than a single match ?
hello code monkey. first of all, thanks for the video. there was something that stuck in my mind, I want to set up a room while using the lobby and relay, and there will be a maximum of 4 people in each room, can I set up unlimited rooms in this way? or is there a limit? my english is not very good, so I may have missed something while watching the videos, I would be glad if you answer
"Hello, I have a question about Multiplay hosting. When I set up the fleet cloud server density, I get the message: 'Your servers have used more resources than allowed within the past 24 hours. If this happens often, you may experience issues.' I am on the Pay-As-You-Go plan, though."
hmm I haven't seen that message myself, maybe you just need to up the CPU on the server? Maybe it means you're using up more resources than you defined during setup
I have a few questions 1. I'm able to create a game the have lan game and indernt with the new unity Networking system ? 2. This indernet service are free and if not it's expensive ? 3. If create 1 server am able to make the Player to create the own custom mach inside on this server ?
Hey, thanks for the awesome guide! I didn't quite understand if you still need the Lobby and Relay service with a dedicated server? Are lobbies now managed though allocations on the dedicated server, or do we still use the Lobby service to define the rules of when and how players can join?
You would choose between Game Server Hosting or Relay, depending if you want dedicated servers or not Then you can add Lobby on top of either of those, use the Lobby to group your players then have all players in a lobby join the same server
@@CodeMonkeyUnityHi! i Watched your video about unity relay. Can you give me tutorial about how to change from relay to dedicated server? I am confused because the code from the relay and lobby tutorial is completely different from this tutorial
Lower delay but higher cost. With relay the packet needs to go to the Relay, then to the Server, then back to the Relay then back to the Client. With Dedicated server you have a dirent connection.
Heh thankfully it was only a minor thing which has a simple solution. I think the issue is more with the limitations of the built-in JsonUtility rather than the WebAPI itself. That class also has issues with parsing JSON into properties, only works with fields, so it has some strange limitations.
@@CodeMonkeyUnity I haven't got any problem with complexity, just realized it. 😀I'm developing web applications for bank, so complexity is not a surprise for me.
@Code Monkey, Hi. Tell me this video is where it talks about how to create a server in which the computer does not need to be constantly turned on and there may be zero or more players on the server? (I don't understand English, so I use a translator)
Hi codemonkey, should I watch you videos "matchmaking and Server Hosting) after completing the multiplayer tutorial for kitchen chaos? Or there is no relation between them.
Yup watch them afterwards, in those videos the starting point is the last project files of the course Although if you just want to learn about these tools they also work as standalone tutorials
dumb question, so I am making a mobile game, but want to have it hosted on Unity dedicated server build, should I make the game (Android) and then change the platform to server (whether windows or linux)? or should i keep it mobile build and deploy it to unity dedicated servers? is there a video/steps? again this is going to be for hosting a mobile game server.
It's not per users, it's based on the resources the server uses which will differ depending on how heavy your game is. unity.com/solutions/gaming-services/pricing
Hello, I tried to follow the tutorial and when clicking the multiplayer button I get an error in Unity console saying: [MatchMaker]: BadRequest(21400), (400) HTTP/1.1 400 Bad request. Then i also have an error message in the server events saying: Allocated server had issues (Query didn't respond or responded incorrectly [DOWN]), stopping server and deallocating. I'm not sure if the problem is the matchmaker or in the server or both
Thanks for the tutorial! Could you tell me which services and methods are better to use for a game where a player presses 1 match search button and when he finds an opponent (1x1), the game starts. Is this a hidden lobby + relay or is something else needed? (Smth like in Dota 2 or Brawl Stars)
Hey Awesome tutorial. Was just researching on lobby and DGS and this video was god send. Just want to ask some questions In the MainMenuDedicatedServer, you have loaded a LobbyScene on start. Let's say I have 2 maps, how can I set it up so that based on which map the player selects, that map's lobby scene is loaded? If I want the player to automatically join the first lobby with available slot in the list of lobbies inside a map; how can I achieve this using DGS?
You want the Lobby itself to be in different maps or just the GameScene? Either way the answer is the same, have the Host/Server change the Scene and all the Clients will receive the change. I'm not sure what you mean "list of lobbies inside a map", Lobby has no concept of "map", it's just a grouping of players. And DGS has no concept of Lobby, it's just a dedicated server. Whatever logic you are trying to implement first get it working with a regular Host, if it works with a Host it will work with a Dedicated server.
Hello I was just wondering for the servers when testing do you have to upload the files to the build every time you make a change? Also how did you define DEDICATED_SERVER so the server will run that logic
Hey @CodeMonkeyUnity. I am seeking here a small info that I couldn't find about the multiplay. I am trying to understand how Game Server Hosting service will work on in a specific game so as to understand how it can optimize costs and if the service will fit these needs in the future. The game is a 2 player board game let's assume chess for example, where the server side load is mostly keep a record of game state, calculate and validate player's input/moves and relay that verification and input to other clients for local replication and game state sync. My biggest doubts stem from how the concept of server correlates to the concept of CPU Cores in Unity's pricing model. Since this game is decently simple I expect that each individual session's core usage will be small, but am I able to host multiple sessions without rounding core's to the next integer core? Hypothetically, if one core could run 2 sessions of this game and I have two "servers" each running a session, will our core usage be 1 or 2? If so, would be need to create a solution to be able to run several sessions inside the same server, or is it done by default? Thank you all
I believe that's going to depend on how your server code runs, it will automatically try to fit as many instances in one server as possible. So if your server code is really lightweight you can fit a lot of them into a single server which should have a very low cost. Or for that kind of asynchronous multiplayer you can even go with a simple cloud server that only runs logic when a move happens, I sort of did a multiplayer tic tac toe like that ua-cam.com/video/EEQfSmK1nXA/v-deo.html
Hi Code Monkey, Awesome tutorial video. Do you have an existing video on how to manage players creating ID, logging in and how to save and retrieve player character data from server side to the game?
That is going to be heavily dependent on what you use for server side data, Unity doesn't currently have any server data storage (although they have Cloud Code) so youcould use something like Azure unitycodemonkey.com/video.php?v=qdE01Xg3y2A
I have a really pain headache solving memory usage issue with Unity Multiplay. Did you experiencing big memory usage increase sometimes when player join/leave? The issue is not happen with windows dedicated server build tested on local, but happen in Multiplay with Linux build. Maybe this issue won't matter with 4 players in 1 rooms, but for City Hub that will contains 100 players is a really big problem!
A video I would loooove to see is how to create a user login system (wow is my inspiration) where you can have characters tied to your account and stuff. I attempted something similar using firebase a while back but was worried about security on the database lol
Yeah for that you need some server side logic/storage, Unity itself doesn't have any tool for that. I covered Azure a while ago unitycodemonkey.com/video.php?v=EEQfSmK1nXA You could use Unity Authentication to get the PlayerId, then store that id alongside whatever player data you want in the cloud
I trying to find tutorial for make an account on server and how to send and use a data like character items, experience. All uing netcode for game objects. Using cloud save.
hello sir i cannot connect my client to the dedicated server it takes too long time to connect and finally gives failed to connect to the server all my ips and port match in client and server port is 9000 automatic and ip varies according to server please help can i achieve this without using relay??
But that way i have to pay all the servers or no? I would like to give people the option to host their own dedicated server instance on a windows or linux machine and just have some masterserver maybe, or working with steam or playfab, etc. This way, you can't really make a free game out of it without monetizing it somehow to pay the servers. Sorry if i misunderstood something.
Yes if you want technically you could build the entire infrastructure yourself, but that will still cost you If you're making a free game then the best option is P2P, just use Relay or NAT Punchthrough instead of dedicated servers
Do you have tutorial on Shaders? I want to learn how to write shaders, I’m making a mobile FPS game and I want to create the most optimized shader possible. I know it’s going to take me months, or maybe even a year, but I’m willing to put in the effort to make my game look great.
Hello, I dint tried this yet, but can you tell me if this works with assets such as fishnet networking, photon, mirror and others of the sort? Or just the new Unity multiplayer?
This is completely separate from the Netcode layer so it can work with any of those tools. For example Apex Legends uses this and it does not use Netcode for Game Objects (or even Unity)
Are you running one match per one server? Aren't servers priced per amount? Wouldn't it be better to have minimum amount of servers that run multiple games at once? Thank you!
Thanks for this awesome tutorial. I am getting this error while joining : Server having issues (Query didn't respond or responded incorrectly [DOWN]) for 120 seconds (Restarted 0 time(s)) Failed to connect to server.
How do you set up matchmaking in Multiplay? Or how do you integrate some other matchmaking service (Playfab for example). In Playfab there is option to make a sarver instance for finished matchmaking ticket, so players that were gathered by matchmaking into a match are joining that server. How do yoou make something similar with Multiplay?
I can't think of any reason why it wouldn't work, Netcode just synchronizes objects, the target platform doesn't matter. Same thing on the dedicated server, it's just a Linux server that runs the server logic regardless of what platform is connecting to it.
It would be great to see a tutorial on alternative multiplayer approach using p2p connections and free lobby/relay services, for example Epic Online Services. Because I think Unity services are too expensive for an indie dev. As far as I know EOS are free, and bindings for Unity exist.
Yes you can combine any of these services with other providers. Although I'm curious, what makes you think Unity services are too expensive? The relay has 50 free CCUs, 99% of indie games don't get anywhere close to that amount, except maybe during launch week. Their pricing seems very generous to me, although obviously completely free is more generous but if you look at EGS there is an asterisk where you cannot use too much bandwidth.
@@CodeMonkeyUnity Most of my games are mobile free-to-play games, and maybe 5 out of 100 players ever buy something. If 50 players made a purchase for $3 ($2 my cut of IAP) while other 950 players just played the game for a month, my earnings would be 50 * 2 - 950 * 0,17 = - $61. Even worse considering bandwidth price, taxes and other expenses. And I'm not using dedicated servers which would cost even more. The calculation might be a bit off, it is just an illustration of my concern. If I publish on Steam, there is free Steam Networking and free Epic's EOS. BTW, where did you find limits of EOS p2p solution? All limits I found are related to requests per minute for other services like matchmaking.
I prefer Photon (free for development) because Unity multiplayer server service have not a free tier, only a credit for $800 for 6 months that really is not is very usable in almost indie projects that can take years of development.
If your budget can't afford the cost of this tool then you probably shouldn't be using dedicated servers at all, for most indie games you probably should stick with Relay instead.
If you're using Game Server Hosting then Unity hosts the server. But alternatively you can also run a Server on whatever machine you want, or even simply use Host
On this, do Unity allow custom matchmaking algorithims and for players to be able to queue to multiple locations at once for Match making?Since that's one thing I've always hated about apex, there's a billion different servers and you can't play together, so the matches are terrible quality(this was extremely obvious when Arena came out, literally had bronze players vs top 10 people in other team...)
Hmm not sure what you mean by "queue to multiple locations at once", like queue simultaneously for Ranked and for Casual? I think that should be possible, I think you should be able to create 2 tickets, one for each pool, and cancel the second one when the first one goes through. I'm covering the Matchmaker in the next video and it's a very robust tool with tons and tons of options.
Can this be used with Unity’s 3rd party networking solutions like FishNet and Mirror? And are Unity dedicated servers are able to handle a lot of traffic from large scale games, like MMORPGs?
🌍 Learn more about Game Server Hosting on.unity.com/3ZW9VZT
❤ Watch my FREE Multiplayer Course ua-cam.com/video/7glCsF9fv3s/v-deo.html
✅ Get the Project Files unitycodemonkey.com/video.php?v=IvCVFywNXMc
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
🔴 RELATED VIDEOS 🔴
Learn Unity Multiplayer (FREE Complete Course, Netcode for Game Objects Unity Tutorial 2023) ua-cam.com/video/7glCsF9fv3s/v-deo.html
Learn Unity Beginner/Intermediate 2023 (FREE COMPLETE Course - Unity Tutorial) ua-cam.com/video/AmGSEH7QcDg/v-deo.html
Download Data/Images from inside Unity (HTTP WebRequest) ua-cam.com/video/Gk0-amfn5DM/v-deo.html
Easily handle MATCHMAKING in Unity! (Skill based, Platform, Region) ua-cam.com/video/90Iw1aNbSYE/v-deo.html
Can you do a video that shows how to make blood effects in 3D?
Can you make a video tutorial about Leaderbord with Unity Game Srvices ?
💕
Code Monkey, I want to say a HUGE thank you!!!
I'm making my first multiplayer game, and I don't have any experience with network related stuff like servers, IPs, etc...
And your videos covering UGS have been super helpful! When I learn about a multiplayer related terminology like relay, lobby, etc...and I make a research on it, your videos pop up. Your channel is like a big library that has a vast collection of unity knowledge and wisdom. No other channel has that, not even Brackeys or even Unity.
If I actually finish this game(still very likely that I'll finish it even though it's a DOTS game), I'll credit you.
I really appreciate you man
That's awesome! I'm glad the videos have helped you! Best of luck with your game!
It's been great collabing with you - keep up the awesome work!
Thanks Unity!
Continue working together please 🎉 !
Looks like Unity already sponsored this, but here is my appreciation too. Literally could not do this without you. Thanks Hugo!
Many thanks for the super thanks! This was pretty tricky to research since there's a bunch of gaps in the documentation so I really hope it helps people!
W
Thank you so much for learning and sharing your knowledge with us 🙏🏼. I love how you cover every detail of the process, especially the potential issues we may face.
Yet again, CM saves me a bunch of time when first venturing into a new process.
Thanks Taro! I'm glad the video helped you!
Great timing....I am just completing the Lobby creation section in the multiplayer course and you had published the dedicated server hosting video...Thanks for all the help you have provided.
I'm glad you are creating some resources for this. The documentation is extremely sparse and I struggled for too long understanding the necessary components to achieve what I wanted, especially between the Manual and APIs (I was livid that APIs for working with server infrastructure were completely missing from anywhere in the manual. That's an incredibly important thing to just leave out, like ok you can start a server by clicking "Start Server" but no one ever in the history of server infrastructure is going to run their game by manually starting their servers every time lol). I'm sure many more developers will find this video extremely useful.
Yeah it took me quite a lot of researching and trial and error to figure all this out, I definitely wish this video existed when I started learning heh
Great content, thank you once more. Your tutorials are invaluable to the community!
Thanks for the super thanks! I'm glad the videos have helped you! Thanks!
You are amazing and a legends thank you, I have made significant breakthroughs on my game dev & programming journey thanks to you.
You're awesome! Thanks again :)
Bruh I didn't get a notification for this video, this is so useful! Thank you
Excited for this video!
Super video !
I might be wrong but I find Multiplay super expensive if you let it run 24/24h. (VPS' seems way cheaper but that depends on your usage)
Be careful if you use any unity gaming services it starts the timer for the free credits for multiplay (found out the hard way)
I'm not too familiar with all the options that exist so really no idea how expensive/cheap this is compared to running your own on AWS/Azure.
All I can say is that for testing for this video I started maybe about 30 servers, maybe total uptime about 10 hours (not all at once, so not 30 * 10) and my final cost is $2, no clue how that would scale to a published game.
@@CodeMonkeyUnity good to know !
@@CodeMonkeyUnity yeah but you are an experienced unity developer. imagine some new dev developing a game during 1 year or more, testing multiplayer during that time. it gets expensive, especially when the dev doesnt live in europe/usa and dollar isnt cheap
I'm so behind on your tutorials, so many tutorials to watch and learn
You are the best teacher. Thank you for your hard work!
Thank You for sharing this knowledge 👍🏻
Could you do a tutorial about how to implement a production-ready Client-side Prediction for a fast-paced multiplayer game?
12:24 oh my god thank you, I was banging my head against this for days now
What you do is AMAZING!
Great tutorial! I learned a lot about game server hosting and can't wait to try it out.
i love this man so much
This is amazing. Thank you!
Thanks for the super thanks!
Great video and thanks for making guides on new features and systems!
A quick question for the people who have experience with the service - what does Unity offer as part of the free tier plan? Is there a free tier anyway? 🤔
I don't get it. Why everyone says making a multiplayer game is not worth it because setting up network is difficult and expensive when it's this simple? Is there a catch?
It's always more difficult than a singleplayer game since you have to build all the same things of a singleplayer game and then add multiplayer on top.
But yes thanks to the tools that exist nowadays making something multiplayer isn't the huge challenge it once was.
Hi, thank you for making such informative videos. I have question: can I use 1 server to run multiple lobbies? And have separate game scene for each lobby? What should I learn to implement such logic?
Hi, a few questions I'm curious about;
- Can we do peer to peer connection with netcode for entities? Without needing relay. So a player would be host and the rest of the users clients.
- Can we just get a few aws ec2 instances and use them as our fleet, create server allocations on that? For either netcode for gameobjects or netcode for entities.
- Are there any competitors you know of that compares to Multiplay?
You can indeed do direct P2P with NGO without Relay, you just need to manually set the IP of the Host and make sure the Host accepts the connection. The Relay just helps bypass issues with firewalls and port forwarding.
You can make an AWS server hosting the dedicated server yes, NGO doesn't care where you host the server. But if you take that route you need to handle all the server fleet management logic yourself.
I'm not sure of other tools just like Multiplay, but I'm guessing Unreal probably has something in their services list.
Just awsome !
would you recommend this to a small indie dev ? idk about the pricing of this. lets say i want to make an mmo with like a 1000-2000 ccu, what would be the best option ? thanks for the tutorials
At 9:56 how were you able to create a second server when you set the max number of servers to 1 in the setup?
I'm not 100% sure but I believe that Max refers to physical servers which depending on the resource usage of your servers they can support many or not many virtual servers. Note how all the Available servers have the same IP so I assume all of those are hosted in a single physical dedicated server.
This is what I exactly need😊😊😊
I dealt with the clientrpc issue u mentioned all day today 😂 unity is updating the clientrpc and serverrpcs soon to be more generic calls with something to pass through instead. Idk maybe it will make it less topsy-turvy.
Yeah I saw they're in the process of making just a single RPC that works for both Client and Server, that should help simplify some things
Thanks for this info about ClientRpc and ServerRpc - because I just tested dedicated build for my game and it was behaving oddly. I looked a little into but then put it aside as I needed to focus on something more important.
Now while eating lunch I watched this video and you just saved me from HOURS/DAYS of troubleshooting to figure this out!
NGO should for sure log something out, just like they do in other cases where you try and set a server only NetworkVariable etc.
It make sense, maybe, that ClientRpc isn't running on a SERVER - but ServerRpc? Why the hell is that not running on a Server...its a Server you know :P
Else they should have called it ClientRpc and HostRpc.
Really odd - but very happy I know this now, will make it a lot easier to refactor so it works.
Yeah that part was really insane, definitely drove me crazy for quite some time, I'm glad I saved you from that!
@@CodeMonkeyUnity Yeah I experienced the problem right away with dedicated, but didn't spend time to look into it. Then I was watching this video as part of research. So yeah you for sure saved me hours of work/research.
Afterwards when researching why it is made like this I also ended up on your thread on the Unity forum on the topic :D
Thank you so much this video helped me alot
Greate Video Learn Unity Multiplayer
so here for each match ,a server will be allocated then there will be a lots of servers or should i make a server build to handling more than a single match ?
Hi! Love your videos :) Do you have any plans to make a video about Netcode for Entities? ^^
Yup, when it finally hits 1.0 I definitely want to cover that, I haven't looked at it at all so no idea how different/similar it is to NGO.
hello code monkey. first of all, thanks for the video. there was something that stuck in my mind, I want to set up a room while using the lobby and relay, and there will be a maximum of 4 people in each room, can I set up unlimited rooms in this way? or is there a limit? my english is not very good, so I may have missed something while watching the videos, I would be glad if you answer
awesome bro thanks a lot
Thank you!
You Best
"Hello, I have a question about Multiplay hosting. When I set up the fleet cloud server density, I get the message: 'Your servers have used more resources than allowed within the past 24 hours. If this happens often, you may experience issues.' I am on the Pay-As-You-Go plan, though."
hmm I haven't seen that message myself, maybe you just need to up the CPU on the server? Maybe it means you're using up more resources than you defined during setup
Thanks mr.Code Monkey! Always best Unity tutorials ;)
Make a video about pricing please :)
I have a few questions
1. I'm able to create a game the have lan game and indernt with the new unity Networking system ?
2. This indernet service are free and if not it's expensive ?
3. If create 1 server am able to make the Player to create the own custom mach inside on this server ?
Hey, thanks for the awesome guide! I didn't quite understand if you still need the Lobby and Relay service with a dedicated server? Are lobbies now managed though allocations on the dedicated server, or do we still use the Lobby service to define the rules of when and how players can join?
You would choose between Game Server Hosting or Relay, depending if you want dedicated servers or not
Then you can add Lobby on top of either of those, use the Lobby to group your players then have all players in a lobby join the same server
@@CodeMonkeyUnityHi! i Watched your video about unity relay. Can you give me tutorial about how to change from relay to dedicated server? I am confused because the code from the relay and lobby tutorial is completely different from this tutorial
Thank you a lot my friend
Photon or Netcode what should I use?
awesome tut!!! more more more
I just have one question. Why, when queuing an allocation request, you are providing an allocation-id? isn't this supposed to create an allocation-id?
Why choose dedicated server instead of relay ? How to know what you should do ?
Lower delay but higher cost.
With relay the packet needs to go to the Relay, then to the Server, then back to the Relay then back to the Client. With Dedicated server you have a dirent connection.
Sigh, I was learning game dev to try and get away from all the hoops of web apis. When you started mentioning malformed json I had to take a break.
Heh thankfully it was only a minor thing which has a simple solution. I think the issue is more with the limitations of the built-in JsonUtility rather than the WebAPI itself. That class also has issues with parsing JSON into properties, only works with fields, so it has some strange limitations.
What is the pricing for the servers?
To create a game with many servers across regions like CS2, will net code + dedicated server build also work?
Hey great tutorial, Is it posssbile to host this server experience on a Web browser domain ?
Not sure what you mean by "host", the server lives on a server somewhere, then a WebGL client can connect to it
Great job! Making multiplayer/online games requires huge concentration, does it? You should know several resources (like ids, tokens, api keys etc.)
Multiplayer is inherently more complex than singleplayer but thanks to awesome tools like NGO it is actually not too difficult nowadays.
@@CodeMonkeyUnity I haven't got any problem with complexity, just realized it. 😀I'm developing web applications for bank, so complexity is not a surprise for me.
Where do we get the Linux build files?
@Code Monkey, Hi. Tell me this video is where it talks about how to create a server in which the computer does not need to be constantly turned on and there may be zero or more players on the server? (I don't understand English, so I use a translator)
Hi codemonkey,
should I watch you videos "matchmaking and Server Hosting) after completing the multiplayer tutorial for kitchen chaos? Or there is no relation between them.
Yup watch them afterwards, in those videos the starting point is the last project files of the course
Although if you just want to learn about these tools they also work as standalone tutorials
Any idea how lobby can used with game server hosting?
Is there some way to fetch and add the ip and port in lobby data?
What about player databases please? Like scores coins etc.
You need some kind of server stored data, could be one of the many cloud providers like Azure ua-cam.com/video/EEQfSmK1nXA/v-deo.html
Does the multiplayer video include what you shared in this video? Or is this some extra info?
This is extra, in the course I implemented Lobby and Relay which means a P2P connection, this is Dedicated Servers.
can you make tutorial video for how you can make games with friend(s) in unity?
dumb question, so I am making a mobile game, but want to have it hosted on Unity dedicated server build, should I make the game (Android) and then change the platform to server (whether windows or linux)? or should i keep it mobile build and deploy it to unity dedicated servers? is there a video/steps? again this is going to be for hosting a mobile game server.
Yes exactly, make the game build as Android, and make the server build as Dedicated Server
Thanks for the vidéo, that will be usefull
What's about the pricing ? For 10 users, 100, 1000, 10000 ?
It's not per users, it's based on the resources the server uses which will differ depending on how heavy your game is. unity.com/solutions/gaming-services/pricing
Hello, I tried to follow the tutorial and when clicking the multiplayer button I get an error in Unity console saying: [MatchMaker]: BadRequest(21400), (400) HTTP/1.1 400 Bad request. Then i also have an error message in the server events saying: Allocated server had issues (Query didn't respond or responded incorrectly [DOWN]), stopping server and deallocating. I'm not sure if the problem is the matchmaker or in the server or both
Thanks for the tutorial! Could you tell me which services and methods are better to use for a game where a player presses 1 match search button and when he finds an opponent (1x1), the game starts. Is this a hidden lobby + relay or is something else needed? (Smth like in Dota 2 or Brawl Stars)
That would be either Quick Join, which is from Lobby which I covered in the multiplayer course
Or matchmaking which I will cover in the next video
Hey Awesome tutorial. Was just researching on lobby and DGS and this video was god send. Just want to ask some questions
In the MainMenuDedicatedServer, you have loaded a LobbyScene on start. Let's say I have 2 maps, how can I set it up so that based on which map the player selects, that map's lobby scene is loaded?
If I want the player to automatically join the first lobby with available slot in the list of lobbies inside a map; how can I achieve this using DGS?
You want the Lobby itself to be in different maps or just the GameScene? Either way the answer is the same, have the Host/Server change the Scene and all the Clients will receive the change.
I'm not sure what you mean "list of lobbies inside a map", Lobby has no concept of "map", it's just a grouping of players. And DGS has no concept of Lobby, it's just a dedicated server. Whatever logic you are trying to implement first get it working with a regular Host, if it works with a Host it will work with a Dedicated server.
Hello I was just wondering for the servers when testing do you have to upload the files to the build every time you make a change? Also how did you define DEDICATED_SERVER so the server will run that logic
Yes, if you make changes to the server build you need to upload the new build.
I defined that symbol in the Project Player Settings
Hey @CodeMonkeyUnity. I am seeking here a small info that I couldn't find about the multiplay.
I am trying to understand how Game Server Hosting service will work on in a specific game so as to understand how it can optimize costs and if the service will fit these needs in the future. The game is a 2 player board game let's assume chess for example, where the server side load is mostly keep a record of game state, calculate and validate player's input/moves and relay that verification and input to other clients for local replication and game state sync. My biggest doubts stem from how the concept of server correlates to the concept of CPU Cores in Unity's pricing model. Since this game is decently simple I expect that each individual session's core usage will be small, but am I able to host multiple sessions without rounding core's to the next integer core? Hypothetically, if one core could run 2 sessions of this game and I have two "servers" each running a session, will our core usage be 1 or 2? If so, would be need to create a solution to be able to run several sessions inside the same server, or is it done by default?
Thank you all
I believe that's going to depend on how your server code runs, it will automatically try to fit as many instances in one server as possible. So if your server code is really lightweight you can fit a lot of them into a single server which should have a very low cost.
Or for that kind of asynchronous multiplayer you can even go with a simple cloud server that only runs logic when a move happens, I sort of did a multiplayer tic tac toe like that ua-cam.com/video/EEQfSmK1nXA/v-deo.html
Hi Code Monkey, Awesome tutorial video.
Do you have an existing video on how to manage players creating ID, logging in and how to save and retrieve player character data from server side to the game?
That is going to be heavily dependent on what you use for server side data, Unity doesn't currently have any server data storage (although they have Cloud Code) so youcould use something like Azure unitycodemonkey.com/video.php?v=qdE01Xg3y2A
I have a really pain headache solving memory usage issue with Unity Multiplay. Did you experiencing big memory usage increase sometimes when player join/leave? The issue is not happen with windows dedicated server build tested on local, but happen in Multiplay with Linux build. Maybe this issue won't matter with 4 players in 1 rooms, but for City Hub that will contains 100 players is a really big problem!
A video I would loooove to see is how to create a user login system (wow is my inspiration) where you can have characters tied to your account and stuff.
I attempted something similar using firebase a while back but was worried about security on the database lol
Yeah for that you need some server side logic/storage, Unity itself doesn't have any tool for that.
I covered Azure a while ago unitycodemonkey.com/video.php?v=EEQfSmK1nXA
You could use Unity Authentication to get the PlayerId, then store that id alongside whatever player data you want in the cloud
@@CodeMonkeyUnity ooo that’s interesting. I’ll have a look at that and maybe I’ll give it a shot again! Thank you sir
hey bro please help me, i am working on windows, how do i host a windows build on a dedicated server? please help man thanks
I trying to find tutorial for make an account on server and how to send and use a data like character items, experience. All uing netcode for game objects. Using cloud save.
Yes that would be done through cloud save, no relation to NGO
hello sir i cannot connect my client to the dedicated server it takes too long time to connect and finally gives failed to connect to the server all my ips and port match in client and server port is 9000 automatic and ip varies according to server please help can i achieve this without using relay??
Only when unity sponsors someone, that they find their tools useful.
But that way i have to pay all the servers or no? I would like to give people the option to host their own dedicated server instance on a windows or linux machine and just have some masterserver maybe, or working with steam or playfab, etc. This way, you can't really make a free game out of it without monetizing it somehow to pay the servers. Sorry if i misunderstood something.
Yes if you want technically you could build the entire infrastructure yourself, but that will still cost you
If you're making a free game then the best option is P2P, just use Relay or NAT Punchthrough instead of dedicated servers
Hi, is there a way to use UGS with AWS? or transfer the configured project to our servers?
Not sure exactly what you mean by that but yes you can use AWS to host your dedicated servers instead of Unity's Game Server Hosting
Can dedicated servers be linked with Lobby so that players can host and join with a code?
Do you have tutorial on Shaders?
I want to learn how to write shaders, I’m making a mobile FPS game and I want to create the most optimized shader possible. I know it’s going to take me months, or maybe even a year, but I’m willing to put in the effort to make my game look great.
ua-cam.com/play/PL78XDi0TS4lEBWa2Hpzg2SRC5njCcKydl.html
I've only used shader graph, never made shaders with code
I made some tutorials here unitycodemonkey.com/search.php?q=shader
Oh my god thanks you ❤❤❤
Hello, I dint tried this yet, but can you tell me if this works with assets such as fishnet networking, photon, mirror and others of the sort? Or just the new Unity multiplayer?
This is completely separate from the Netcode layer so it can work with any of those tools. For example Apex Legends uses this and it does not use Netcode for Game Objects (or even Unity)
@@CodeMonkeyUnity Oh I see, thats nice. Thank you so much :)
Are you running one match per one server? Aren't servers priced per amount? Wouldn't it be better to have minimum amount of servers that run multiple games at once? Thank you!
Yes and no. Note how I set it for just one server but it made multiple allocations, those are all seperate games running on just one server.
What would be an alternative for network transform for multiple online enemies
Thanks for this awesome tutorial. I am getting this error while joining : Server having issues (Query didn't respond or responded incorrectly [DOWN]) for 120 seconds (Restarted 0 time(s))
Failed to connect to server.
Did you implement the Query protocol? If not the server gets considered unresponsive and quits
@@CodeMonkeyUnity I don't find the query protocol. How do I implement the query protocol?
How do you set up matchmaking in Multiplay? Or how do you integrate some other matchmaking service (Playfab for example). In Playfab there is option to make a sarver instance for finished matchmaking ticket, so players that were gathered by matchmaking into a match are joining that server.
How do yoou make something similar with Multiplay?
I'm going to cover matchmaking in the next video
Means if I want to test this I always need to create test allocation if not then I have to buy the paid version of this? Because it's timer of 1 hour
Is it a similar process to use Photon fusion, and Multiplay?
It should be similar, Multiplay is meant to work with any Netcode stack
Does this service work for custom network solutions too? Or do we have to use unity networking only?
You can use it with anything, for example Apex Legends uses this but does not use Unity or Unity networking
I wish there was something out there that showed it working with Mirror instead of netcode
Is it possible to create Netcode games with AR Foundation as a dedicated server? I'm having a difficult time finding information about that.
I can't think of any reason why it wouldn't work, Netcode just synchronizes objects, the target platform doesn't matter. Same thing on the dedicated server, it's just a Linux server that runs the server logic regardless of what platform is connecting to it.
It would be great to see a tutorial on alternative multiplayer approach using p2p connections and free lobby/relay services, for example Epic Online Services. Because I think Unity services are too expensive for an indie dev. As far as I know EOS are free, and bindings for Unity exist.
Yes you can combine any of these services with other providers.
Although I'm curious, what makes you think Unity services are too expensive? The relay has 50 free CCUs, 99% of indie games don't get anywhere close to that amount, except maybe during launch week.
Their pricing seems very generous to me, although obviously completely free is more generous but if you look at EGS there is an asterisk where you cannot use too much bandwidth.
@@CodeMonkeyUnity Most of my games are mobile free-to-play games, and maybe 5 out of 100 players ever buy something. If 50 players made a purchase for $3 ($2 my cut of IAP) while other 950 players just played the game for a month, my earnings would be 50 * 2 - 950 * 0,17 = - $61. Even worse considering bandwidth price, taxes and other expenses. And I'm not using dedicated servers which would cost even more. The calculation might be a bit off, it is just an illustration of my concern. If I publish on Steam, there is free Steam Networking and free Epic's EOS. BTW, where did you find limits of EOS p2p solution? All limits I found are related to requests per minute for other services like matchmaking.
Pun 2 is alternative of unity game server??
I prefer Photon (free for development) because Unity multiplayer server service have not a free tier, only a credit for $800 for 6 months that really is not is very usable in almost indie projects that can take years of development.
If your budget can't afford the cost of this tool then you probably shouldn't be using dedicated servers at all, for most indie games you probably should stick with Relay instead.
hi, can someone wxpline how the unity multiplay pricing work?
(i want to make a multiplayer game and i dont sure how much it will cost me)
Do I need a PC for the server or does unity have there own like a 3d party or do I run the server on my PC or whatever
If you're using Game Server Hosting then Unity hosts the server. But alternatively you can also run a Server on whatever machine you want, or even simply use Host
On this, do Unity allow custom matchmaking algorithims and for players to be able to queue to multiple locations at once for Match making?Since that's one thing I've always hated about apex, there's a billion different servers and you can't play together, so the matches are terrible quality(this was extremely obvious when Arena came out, literally had bronze players vs top 10 people in other team...)
Hmm not sure what you mean by "queue to multiple locations at once", like queue simultaneously for Ranked and for Casual? I think that should be possible, I think you should be able to create 2 tickets, one for each pool, and cancel the second one when the first one goes through.
I'm covering the Matchmaker in the next video and it's a very robust tool with tons and tons of options.
Helpfull
Can this be used with Unity’s 3rd party networking solutions like FishNet and Mirror? And are Unity dedicated servers are able to handle a lot of traffic from large scale games, like MMORPGs?
Yes, this works with any Netcode. And yes, this is the tool that Apex Legends uses so it can handle pretty much any game you can imagine
IsServer is working in start but not working in update or in other functions