How to set up dedicated server hosting and matchmaking for Unity

How to set up dedicated server hosting and matchmaking for Unity

HomesamyamHow to set up dedicated server hosting and matchmaking for Unity
How to set up dedicated server hosting and matchmaking for Unity
ChannelPublish DateThumbnail & View CountDownload Video
Channel AvatarPublish Date not found Thumbnail
0 Views
Learn how to host a dedicated game server and implement matchmaking using Unity's UGS tools.

ᐅGet the complete source code package for my Unity tutorials
https://sam-yam.itch.io/samyam-full-source-code-to-all-videos

Get the source code
https://www.patreon.com/posts/82134830

Add my new game BUMBI to the Steam wishlist
https://store.steampowered.com/app/2862470/BUMBI/

If you enjoyed the video, please like and subscribe as it helps me a lot. And consider joining me on Patreon or becoming a YouTube member 🙂

Check out the previous video
The ultimate multiplayer tutorial for Unity – Netcode for GameObjects
https://youtu.be/swIM2z6Foxk

️ Setup ️
Multi-play
ᐅcom.unity.services.multiplay
Marriage broker
ᐅcom.unity.multiplayer.tools
Multiplay start parameters
ᐅ-ip ip -port port -queryport query port -logFile log_dir/Engine.log -dedicatedServer -batchmode -nographics

If the client ticket expires, make sure you are connected to Unity Services in the editor (Project Settings ᐅ Services). Sometimes the connection gets lost and you have to click /"Retry connection/".

Video links
Unity Multiplay Documentation
ᐅhttps://docs.unity.com/game-server-hosting/en/manual/welcome
Unity Matchmaker documentation
ᐅhttps://docs.unity.com/matchmaker/en/manual/matchmaker-overview
Best Practices for Game Engines (includes the TargetFPS script)
ᐅhttps://docs.unity.com/game-server-hosting/en/manual/guides/game-engine-best-practices
Your Unity Dashboard
ᐅhttps://dashboard.unity3d.com/
Multiplay start parameters
ᐅhttps://docs.unity.com/game-server-hosting/en/manual/concepts/launch-parameters
Unity command line arguments
ᐅhttps://docs.unity3d.com/Manual/EditorCommandLineArguments.html
Matchplay: A Matchmaker and Multiplay Example
ᐅhttps://github.com/Unity-Technologies/com.unity.services.samples.matchplay

In this video, I explain how to upload your multiplayer game build to Unity Gaming Services (UGS) Multiplay, which acts as a scalable dedicated hosting platform with minimal setup. Then we'll go over Matchmaker, a way to easily connect players and host a match.

Before uploading to UGS Matchplay, we need to create a dedicated Linux server build of our game in Unity. To do this, we will create a script to read the command line arguments passed to the game and determine if the build is the server. It is also recommended to set the target frame rate and disable V-Sync.

In UGS, we then create a build, a build configuration with our startup parameters, a fleet that determines where our server will run, and then test it with a test assignment. We also enable matchmaker in our project. Then back to Unity, we write some boilerplate code to connect our game to UnityGamingServices using the IP and port passed in, and then find a matchmaker assignment that will spin up a server. We also enable backfill to support players joining the game after it has started. On the client side, we write a separate script where the client is logged in anonymously, enables UnityGamingServices, and then attempts to fill out their matchmaking ticket to get assigned to the game. At the end of the video, we also troubleshoot some bugs that arise when hosting the game on the UGS dedicated server platform.

Support me
Patreon: https://www.patreon.com/samyg
Donations: https://ko-fi.com/samyam

️ Timestamp ️
0:00 Introduction
1:12 Game presentation
2:47 Multiplay terms
6:14 Setting up a build for multiplay
31:30 Set up matchmaker
45:29 Matchmaker server script
1:24:56 Matchmaker client script
1:46:19 Replace UGS build
1:48:57 Troubleshooting
1:55:42 Outro

THANKS TO ALL MY DONORS

❯❯❯ My Links ❮❮❮
Patreon
https://www.patreon.com/samyg
Discord server
https://discord.gg/SwCKB3Q
Þjórsárden
https://twitter.com/samyam_youtube
Facebook
https://www.facebook.com/samyam.youtube/
Click “Like” and subscribe!

️ Computer Setup ️
*As an Amazon Associate I earn from qualifying purchases.
https://www.amazon.com/shop/samyam

Gameplay videos shown:
ᐅ10 brand new multiplayer games that try something NEW
https://www.youtube.com/watch?vmfcOf3Bc108
ᐅ15 great couch co-op games you can play with your friends
https://www.youtube.com/watch?v3OSY0iWV53s&t1s
ᐅMario Kart 8 Deluxe – All new DLC tracks (DLC Booster Pack 1) (4K)
https://www.youtube.com/watch?vJ0xw8S5PpCg

#Unity3d
#GameDeveloper
#multiplayer

Please take the opportunity to connect with your friends and family and share this video with them if you find it useful.