The Ultimate Multiplayer Tutorial for Unity - Netcode for GameObjects

Uploaded by samyam
Share: Twitter Facebook
►? Get the Source Code ?
https://www.patreon.com/posts/80190936

If you liked this video please like and subscribe as it helps me a lot, and consider joining my Patreon or becoming a YouTube Member :)

My mic has a bit of static (barely noticeable), I'll have that fixed for the next videos.

⚙️ Set Up ⚙️
►Netcode
ᐅcom.unity.netcode.gameobjects
(if doesn't work add through git) https://github.com/Unity-Technologies/com.unity.netcode.gameobjects
►Multiplayer Tools
ᐅcom.unity.multiplayer.tools
►Parallel Sync
ᐅhttps://github.com/VeriorPies/ParrelSync/releases

? Video Links ?
►Next Video In Series: Easy Game Server Hosting and Matchmaking with Unity Tutorial
https://youtu.be/FjOZrSPL_-Y
►Unity Netcode Documentation
ᐅhttps://docs-multiplayer.unity3d.com/netcode/current/about/index.html
►Unity Multiplayer Tools Documentation
ᐅhttps://docs-multiplayer.unity3d.com/tools/current/install-tools/index.html
►Networked Object Pooling
ᐅhttps://docs-multiplayer.unity3d.com/netcode/current/advanced-topics/object-pooling/index.html
►Networked Singleton
ᐅhttps://gist.github.com/sam-yam/4a5a0460f51e2f7c066cb644504f8de0
►Boss Room Sample
ᐅhttps://github.com/Unity-Technologies/com.unity.multiplayer.samples.coop/releases/tag/v2.0.4
►Galactic Kittens Sample
https://github.com/UnityTechnologies/GalacticKittens
►Eating Sound Effect
ᐅhttps://freesound.org/people/Breviceps/sounds/445987/

In this video I cover how to get started in Networking and Multiplayer games with the Unity game engine. We'll cover the new Netcode for Gameobjects 1.2.0 and Unity Transport. In the next part of the series we will explore Unity Gaming Services (UGS) and upload our build to the cloud along with implement matchmaking.

This video covers making a simple slither.io example to get familiarity with networking concepts, along with going over basic terminology. We first set up the scene by installing the necessary packages, we then add a NetworkManager and select our UnityTransport protocol, then we go ahead and create a NetworkObject of our Player and use the ClientNetworkTransform to move the player with client authoritative movement, we then create some helper functions to start the server and clients, later we create the tails so that each client can have the tails sync locally and they don't have to be sent over the network which can result in a lot of bandwidth (we use NetworkVariables to store the player length and synchronize it across the instances), we then create our food Networked Object and instantiate it with a Network Object Pool, we then shoot out an event for the local client to update their UI, and we create a Singleton that can also be networked that plays from an AudioSource when the local player has collided with a good, then we go over player collision, ServerRPCs, ClientRPCs, Server Authoritative Movement, and finally we limit the amount of players in the map through the ConnectionApprovalHandler.

? Support Me ?
Patreon: https://www.patreon.com/samyg
Donate: https://ko-fi.com/samyam

►⏱️ Timestamps ⏱️
0:00 Intro
1:38 Terminology
13:22 Set Up
18:25 Network Manager
29:45 Client Authoritative Movement
45:48 Start Network Helper Function
48:46 Network Animator
51:39 Sync Tail and NetworkVariable
1:10:06 Food Networked Object
1:16:43 Food Spawner and Object Pool
1:31:03 Local Client UI
1:36:40 Audio Manager Singleton
1:41:00 Player Collision, ServerRPCs, ClientRPCs
2:08:22 Server Authoritative Movement
2:13:11 Connection Approval Handler
2:18:46 Code Recap
2:28:33 Network Profiler and Debug Tools
2:34:48 Outro

??THANK YOU TO ALL MY PATRONS ??

❯❯❯ My Links ❮❮❮
? Patreon ?
https://www.patreon.com/samyg
? Discord Server ?
https://discord.gg/SwCKB3Q
? Twitter ?
https://twitter.com/samyam_youtube
? Facebook ?
https://www.facebook.com/samyam.youtube/
? Like and Subscribe! ?

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

►Gameplay Videos Shown:
ᐅApex Legends: https://www.youtube.com/watch?v=vgRpFAeEAn4
ᐅTemtem: https://www.youtube.com/watch?v=Csx5aK5mZCI
ᐅIsonzo: https://www.youtube.com/watch?v=JYv8KyNRFQM
ᐅAmong Us: https://www.youtube.com/watch?v=vlVeaz_l5Jg
ᐅGunfire Reborn: https://www.youtube.com/watch?v=Y-w7ChPPV4Q
ᐅFall Guys: https://www.youtube.com/watch?v=s8uYE9r3hIg
ᐅRust: https://www.youtube.com/watch?v=LGcECozNXEw
ᐅSlither.io: https://www.youtube.com/watch?v=jBcDBwkV0b8

Thumbnail Snail from slither.io

#unity3d
#gamedev
#multiplayer