Тёмный

How to Setup Dedicated Server Hosting and Matchmaking for Unity 

samyam
Подписаться 87 тыс.
Просмотров 31 тыс.
50% 1

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 87   
@samyam
@samyam Год назад
Wishlist my new game BUMBI on Steam! store.steampowered.com/app/2862470/BUMBI/ like and subscribe because i spent way too long on this
@levayv
@levayv Год назад
It's pure gold , Thanks for content.
@DennisDenchoDenchyaknow
@DennisDenchoDenchyaknow 10 месяцев назад
Only cause you said please, Co pilot is as GOAT as you home skillet butter buisket.
@piotrgora5715
@piotrgora5715 3 месяца назад
This is the first tutorial I’ve watched in my six years of game development that I implemented in my own project without encountering any errors. I’ve never experienced that before! I loved that she explained each function of the code in detail. Thanks for the great tutorial!
@samyam
@samyam 3 месяца назад
Thank you 🙏☺️
@tranhoangmih5107
@tranhoangmih5107 Год назад
Not all angels have wings, thanks for the effort, I have been stuck for a few days due to not having a clear tutorial on how to set up the GSH in your code, thanks again
@mingoms
@mingoms 5 месяцев назад
I followed this today and got my multiplay working first try (except for a line with args string array declaration) Thank you so much!
@118andrey
@118andrey Год назад
"so you're making a multiplayer game and you actually want to have people join your game?"
@erickpeculiar823
@erickpeculiar823 Год назад
thank you so much for this and the other tutorial. I really like the midsection explanations of concepts and the walk through of the code. this definitely is helping me understand and prepare for my final project.
@erickpeculiar823
@erickpeculiar823 Год назад
keep up the good work :)
@최영수-r3m
@최영수-r3m 10 месяцев назад
Thank you!!! You are the best Unity teacher!😁 samyam's videos are always trustworthy. She provides systematic explanations based on her deep knowledge Thank you so~ much! It really helps. You are my lifesaver🤗
@erickpeculiar823
@erickpeculiar823 Год назад
components: servermanagerobj: 20:20 clientBttn obj : 1:24:00
@sadiqabbaszade4789
@sadiqabbaszade4789 9 месяцев назад
Thanks for the amazing tutorial. Are you using Netcode? Or you made your own custom server-clinet networking solution? I wanna make my own using websocket-sharp, by I dont know anything about hosting, scaling and pretty much anything else about hosting a backend server tbh.
@omarbenjdidia4679
@omarbenjdidia4679 5 месяцев назад
Awesome tutorial ❤, was wondering how to deallocate the server upon all players exiting the server.
@shariarpapaon5305
@shariarpapaon5305 Месяц назад
quick question, anywhere you check "if IsServer", can i replace that with a scripting symbol like #if SERVER ? because i dont want the server code to ever be available on the client builds. If i understand correctly the pre-processor symbols will ignore the code if the condition isnt met and essentially omit it from the binary on build.
@krisek98
@krisek98 Месяц назад
Hi! I am facing an issue, where when I want to make the copies join, I often (way too often) get failure, because of being RateLimited Even after checking the matchmaking ticket status every 5 seconds, not 1 second, I still get the same error, when using just two copies of the editor, I might hit a spot where they kind of sync their checking in propper time intervals and it doesnt throw an error. I am aware that the rate limitations say that one chceck should be done every second, but I don't see anyone in the tutorials, both yours and other creators facing the same issue. Do you have any idea what might cause this? Maybe I skipped something I'm really not sure and kind off helpless at this point (wasted over 10 hours already just for this issue)
@NBDbingo5
@NBDbingo5 Год назад
Been excited for this one!
@robsonsiqueira9776
@robsonsiqueira9776 10 месяцев назад
ASMR developing tutorials
@dxlorean2938
@dxlorean2938 5 месяцев назад
hey thanks worked so well!! how do you open your game in two diffirent editor windows ? thanks!
@zamakiel
@zamakiel 16 дней назад
I am having an issue where my two clients are not logging into the same server. I checked the logs and each server timed out on the backfilling. Any idea what I may have missed? I tried increasing the timeout time with no results :(
@stewgamin3294
@stewgamin3294 3 месяца назад
Question what could cause a failed to connect error when there there aren't any firewalls blocking the connection?
@SolarSoftMedia
@SolarSoftMedia 6 месяцев назад
I'm trying to understand/estimate the billing on UGS. I remember once doing a tutorial on Amazon Web Services and was charged over $600 for one month because I wanted to take a course. I don't want a similar experience on UGS.
@nightnamer1493
@nightnamer1493 5 месяцев назад
amazing video thanks for all the help! Wish a video like this could recieve 1m views but its a niche.
@esrivera2228
@esrivera2228 20 дней назад
nice tutorial, very thanks!!!
@JadenGoter
@JadenGoter Год назад
Amazing video, thanks so much for putting this together! I just joined the UGS team and used this as my onboarding, lol. I know it was long so I appreciate the effort you put into it :D Great stuff!
@samyam
@samyam Год назад
Oh wow that’s cool 😂 Glad it helped and congrats on joining the team! Looking forward to more cool stuff from you guys.
@theparashari5833
@theparashari5833 Год назад
Love your voice mam .. i am familiar with English but your voice is easy to understand
@1_8t
@1_8t Год назад
Can you explain client side prediction😢😢
@samyam
@samyam Год назад
Maybe in a future video!
@francis900
@francis900 Год назад
This is gold, Thank you
@PawanRamnani-r9b
@PawanRamnani-r9b Год назад
This tutorial is amazing. Really appreciate the effort 👏. Are you planning to make a video on cloud content delivery?
@samyam
@samyam Год назад
Thank you! No not at the moment :)
@susan6183
@susan6183 7 месяцев назад
Could I ask you want when we modify script do we need to update the dedicated server too? If need do we have any solution to only update the change not entire script I always update 70mb all the time it spend so much time update only one change script.
@jigneshghelani3559
@jigneshghelani3559 Год назад
Hi Samyam, I see you the video you are doing a great job and providing a good knowledge for Unity developers keep it up. But I have a question I am a student studying BSc game design and development I want to be a game programmer when I watch videos and learn to code I understand easily but when I try to do it myself it's going worst How can I deal with this please give me idea and suggestion for be a good game programmer thank you.
@samyam
@samyam Год назад
Practice practice practice! Problem solving is one of the most important skills for a programmer. Write out on a piece of paper the logic before starting to implement, visualize before diving into the programming it helps a lot
@sumitcutevil9260
@sumitcutevil9260 9 месяцев назад
how can i delete the backfilling ticket of the player leaving the session in this?? and what does happens if it does not delete the backfilling ticket?
@johnny5alive238
@johnny5alive238 6 месяцев назад
Hey Sam, great video everything works great, I'm using this with mirror, not a lot of changes other than how the port and Ip get assigned. Only issue I'm having is if there is only one game going, say you start a game and 2 players join and they successfully match in that one game, then one player dissconnects(quits), they do not get connected back to that one game, and no one trying to join, say a 3rd player can join that game once the max players is reached. So once max players is reached.. no one else can join that game at all.. might be in my conversion.. any thoughts? been working on a fix for a few hours now. EDIT: Finally figured it out, in order for a player to rejoin a server they have disconnected from, you need to remove them from the localticket, then update the ticket with matchmaker then resume backfilling for anyone having the same problem.
@ChiefDev
@ChiefDev 5 месяцев назад
Do you have any code example of how you did this? I have a similar problem, I can't correctly call the ClientDisconnected() function because I'm using a mirror. So my matches are always being allocated giving the same error as you. Can you help me?
@johnny5alive238
@johnny5alive238 5 месяцев назад
@@ChiefDev Sure, I'm calling this from a NetworkBehavior OnStopServer() on the player prefab and passing the player id as a parameter that is a sync var so the server knows the playerID. public async Task RemovePlayerFromMatch(string userID) { var playerToRemove = GetPlayerById(userID); if (playerToRemove == null) { Debug.LogWarning($"No user by the ID: {userID} in local backfill Data."); } _localBackfillTicket.Properties.MatchProperties.Players.Remove(playerToRemove); //We Only have one team in this game, so this simplifies things here _localBackfillTicket.Properties.MatchProperties.Teams[0].PlayerIds.Remove(userID); await MatchmakerService.Instance.UpdateBackfillTicketAsync(_localBackfillTicket.Id, _localBackfillTicket); ClientDisconnected(); } Then in ClientDisconnected() I changed to this public void ClientDisconnected() { if (!_backfilling && networkManager.numPlayers > 0 && NeedsPlayers()) { _ = StartBackfill(_matchmakingPayload); } }
@richardgomes7d
@richardgomes7d Год назад
samyam thank you for this tutorial! (it's clear the amount work you put into these) I was having this error on the FoodSpawner (Awake, OnEnable, and OnDisable) and the ConnectionApprovalHandler (Awake) "Object reference not set to an instance of an object". I figured it had to do with the client trying to run server code so I added this line *if (!NetworkManager.Singleton) return;* I don't get the error now but after the ticket gets assigned (I am able to see the success assignment log) nothing happens. I just get an empty screen on the client with the Length: 1 text at the bottom. But there's no player nor food on the screen. I can see the tickets being received and matched in the UGS console. Any ideas what I could be missing?
@hausucat_9655
@hausucat_9655 Год назад
I'm seconding this question, I seem to be having the same issue! Seeing "NullReferenceException: Object reference not set to an instance of an object" in FoodSpawner.Awake(), FoodSpawner.OnDisable(), and ConnectionApprovalHandler.Awake().
@samyam
@samyam Год назад
Hi, did you make sure to follow the bug fixing section at 1:48:57 ? There's a couple of bugs I fix there. Let me know if that helps. If not feel free to elaborate exactly where you are having the error and/or post in our Discord (link in description)!
@hausucat_9655
@hausucat_9655 Год назад
@@samyam Hello! I really thought I replied to this comment but it seems to have not gone through. I did go through the bug fixing section and reuploaded the bug-fixed build on UGS. I posted in the Discord as well, but the exact lines I'm having trouble with are NetworkManager.Singleton.OnServerStarted += SpawnFoodStart, NetworkManage.Singleton.OnClientConnectedCallback -= OnClientConnect, and NetworkManager.Singleton.ConnectionApprovalCallback += ApprovalCheck (in the three functions I mentioned in the last comment respectively). Is that helpful?
@duarrdo_g
@duarrdo_g Год назад
After the bug fixes, I corrected these issues making both an Awake and a Start for the FoodSpawner script, checking if it's the server in Awake before subscribing to OnServerStarted and, with a bool, checking if it was already done in Awake before doing the same in Start. Also I moved the content from OnEnable to Start and used the same line richard used before calling the content inside OnDisable.
@igormoreiravilhena2917
@igormoreiravilhena2917 Год назад
Hey Samyam, which is better Unity Gaming Services Multiplayer or Netcode for GameObjects to dev a competitive multiplayer game 3vs3 per match with lobby and cosmetic itens Thank you for the tutorial
@samyam
@samyam Год назад
Netcode is the unity framework to allow multiplayer functionality in your game, UGS has features that help make multiplayer development easier such as voice chat and dedicated server hosting. You can have both in your project. If you wanted to upload to Steam you could use Netcode and a Steam transport (steamworks).
@igormoreiravilhena2917
@igormoreiravilhena2917 Год назад
@@samyam Thank you dear samyam for your response and advice ☺
@Elliotbra
@Elliotbra Год назад
Hello Sam, What can I do if the server log at minute 30 says this: NullReferenceException: Object reference not set to an instance of an object at ServerStartUp.StartServer () [0x00005] in :0 at ServerStartUp.Start () [0x00052] in :0
@Lucid_Music
@Lucid_Music 9 месяцев назад
Ok so im having an issue when I check i don't have a networkmanager component anyone know what could be causing this?
@AstralNostalgia
@AstralNostalgia Год назад
what's the benefit of the scripting instead of using other service like mirror ? or netscope? or photon?
@SolarSoftMedia
@SolarSoftMedia 6 месяцев назад
using Unity.Services.Matchmaker does not exist in the current context. Am I missing a package download or something? I have verified I have the Matchmaker package.
@zamakiel
@zamakiel 20 дней назад
I had the same issue. The problem is installing the matchmaker package from the package manager by searching it. You are looking for the Multiplayer Services package for both multiplay AND matchmaker
@onehornstudio7152
@onehornstudio7152 Год назад
How much is the lag while using unity's dedicated server (approx.)
@sagarhm2237
@sagarhm2237 5 месяцев назад
Can we host on aws ec2 instead of unity service
@wicgamesdev
@wicgamesdev Год назад
thank for this knoledge, i feeel that will be very helpful
@JFx09
@JFx09 Год назад
thx you have the best tutorials form all :D
@OneTime_12
@OneTime_12 Год назад
Would it be possible to run a game on windows or android while having the game uploaded on a Linux server build or would we have to wait for the windows server version instead of the Linux. I notice that you didnt change your build version while testing the game, so that is why I ask. I am working on a VR game and want to do a dedicated server build. If you dont want to answer, given your most recent video on unity, I understand. Thanks.
@samyam
@samyam Год назад
Yeah it doesn’t matter what the server build is in this case, you can use Linux server build and still use non linux devices to connect to your server
@smpsports
@smpsports 6 месяцев назад
@@samyam So you do a Linux build for the server? then switch platform to android or iOS and that build is what people download from the store?
@JFx09
@JFx09 Год назад
could you may make an tutorial how to combine this with an main menu and an waiting for players scene? this wuld be extremle helpfull :)
@yaboishadowninja
@yaboishadowninja Год назад
i think a main menu would just be a regular main menu, it shouldn't involve any multiplayer at all. So if you have a main menu, just have a section that goes into the server selection. That's probably how I would do it. However, I have pretty much no experience with multiplayer (I skimmed this vid and the previous one but I think i'll follow these vids as they seem really well made).
@mieskeb8095
@mieskeb8095 Год назад
This tutorial is amazing! Thank you! Can you also include Unity's Lobby into your project? I'd love to work with that too
@samyam
@samyam Год назад
Thanks! I don’t have any plans at the moment to do that 😅
@ShinichiKudoQatnip
@ShinichiKudoQatnip Год назад
I am having a hard time figuring out the matching, what is the team replica setting? And I need 2 players in a team but both of them connect to 2 different allocations.
@loghzpuzzle7837
@loghzpuzzle7837 25 дней назад
I have the same problem, did you find thé solution ?
@ShinichiKudoQatnip
@ShinichiKudoQatnip 25 дней назад
@@loghzpuzzle7837 Check the logs, after a lot of head banging we found a null reference in the server code that was forcing it to close accepting new connections. I hope yours is also solved.
@zamakiel
@zamakiel 16 дней назад
@@loghzpuzzle7837 I have the same problem, did you find the solution? xD
@erickpeculiar823
@erickpeculiar823 Год назад
Hey I followed the tutorial and it works fine for the main editor (the player and food spawn) but if I run the clone editor nothing spawns. It seems like I am receiving the request on Unity Services since I'm getting the matches so I am not sure why this could be happening. When I start the game the tickets were at 28 but jumped to 31 afterwards and matches went from 13 to 14. could this be caused by the increase on tickets ?
@erickpeculiar823
@erickpeculiar823 Год назад
I fixed this issue by creating new clones. However, My new clones are not loading on to an already deployed server. Instead they are creating their own servers.
@samyam
@samyam Год назад
make sure you have these in the build config for the sever on UGS -ip $$ip$$ -port $$port$$ -queryport $$query_port$$ -logFile $$log_dir$$/Engine.log -dedicatedServer and to make sure you connecting to the right IP and Port through your code
@GigaChadBigW
@GigaChadBigW Год назад
awesome video a W for us
@FriedRiceNietzche
@FriedRiceNietzche Год назад
I usually dont comment on videos but I followed everything but I still get a "Failed to connect to server" at the end. any tips on why this is happening?
@samyam
@samyam Год назад
Where it is failing? Put a breakpoint in your code to find out exactly where it’s failing and check the server logs. One small setting that’s off may cause it not to function properly
@FriedRiceNietzche
@FriedRiceNietzche Год назад
@@samyam Thanks, server seems to be running. clients have a hard time connecting. I even did it manually, like grab a server from my dashboard. turn it on. copy paste IP and port to my clients. still nada.
@christianmcmullin
@christianmcmullin Год назад
@@FriedRiceNietzche I'm having the same issue. I even started a blank project with almost 0 code in it to see if it was my code logic but I'm having the same issue. I'm guessing there is something I'm doing wrong with some setting that I have no clue about.
@Monta9601
@Monta9601 5 месяцев назад
@@FriedRiceNietzche Same problem, how do you fixed it?
@telugutechshashank5362
@telugutechshashank5362 Год назад
Can I Use Mirror Networking With Multiplay And Matchmaker
@justlama0
@justlama0 9 месяцев назад
sure
@ramstar
@ramstar Год назад
Multiplayer using What technology ?
@samyam
@samyam Год назад
It can use any Transport, In the previous video I used Unity Netcode for Gameobjects and this video uses Unity Gaming Services Multiplayer for hosting and Matchmaker for matchmaking
@averageunitydev7089
@averageunitydev7089 Год назад
@@samyam what are the advantages of using one over the other?
@FarwalDev
@FarwalDev Год назад
awesome
@jasonwilliams8730
@jasonwilliams8730 Год назад
👍👍
@haihao3902
@haihao3902 7 месяцев назад
Awesome video, subsicribe and like it!
@samyam
@samyam 7 месяцев назад
Thanks!
@SuDoSuDev
@SuDoSuDev 6 месяцев назад
this is simple, but not silver...this is platinum
@odinspadawan4987
@odinspadawan4987 Год назад
Bro playing league with a controller
Далее
The Power of Scriptable Objects as Middle-Men
17:41
Просмотров 127 тыс.
БАБУШКА ВСЁ ИСПОРТИЛА #shorts
00:24
Просмотров 547 тыс.
Making MULTIPLAYER Games has never been EASIER!
12:49
choosing a game engine is easy, actually
15:08
Просмотров 529 тыс.
Export and Run a Godot Dedicated Server
23:29
Просмотров 10 тыс.
The cloud is over-engineered and overpriced (no music)
14:39
Create a server for your Unity game using .NET Core
24:51
Flyswatting: How to Keep Unfair Fights Interesting
18:15
Game Server Hosting (MULTIPLAY) || Unity Tutorial
12:42