4.56 out of 5
4.56
952 reviews on Udemy

Unity Networking From Scratch for (Unity 5 to Unity 2020)

An Introduction to Unity's UNET API
Instructor:
Penny de Byl
11,277 students enrolled
English [Auto] More
Create multiplayer games and connect Unity created applications over a network.
Understand the different roles played by servers and clients in a network.
Be able to use remote procedure calls to synchronise player-character states in a networked game.

In this course, Penny will take you from the very basics of creating a simple client/server game environment using Unity’s UNET system right through to creating and managing a lobby system.  The topics covered are the ones that most frequently appear on the forums and that many people struggle in understanding.  The course is practical with many step-by-step exercises.  Students of this course will learn about the UNET Network Manager and how to use message sending to synchronise rigid body movement and animation of player characters. Overriding the Network Manager will also be covered to allow developers to create customised network functionality such as changing player characters while playing, shooting projectiles and managing player characteristics such as health.

Topics covered include:

  • network configurations

  • IP addresses

  • hosting

  • remote procedure calls

  • syncing rigidbody movement

  • syncing animation states

  • playing with different player-characters

  • changing player-characters while connected

  • setting up the Unity Lobby asset

  • syncing variable values across scenes

  • setting up Unity Match Making services

Developed in Unity 5, this course remains relevant for versions 2017 and up to 2018.2 with Unity’s Networking API.  Note that although the API is now discontinued in Unity 2020, Penny has provided you with project starter files that allow you to work with the HLAPI in 2020.

What past students of this course are achieving:

  • the development of an online educational multiuser 3d virtual environment

  • the use of mobile devices in place of game controllers

  • MMO game development

What past students are saying about this course:

  • This course is awesome. Penny explains in a pleasant calm and clear manner. The course has a steady increase in difficulty. I loved the way some topics are explained with graphics / animations.

  • I love Penny’s courses. This one gave all the knowledge I need and more when it comes to Networking in Unity.

  • Penny (as always) covers all things necessary for the current section. She leaves no questions to be asked and every course from my understanding is executed without confusion being left in its aftermath. If you do however have a question it is most likely from my experience covered with in another section of the course later on. thank you penny!! you rock!!!

1
Before We Start. What to Use Unity 2020?

If you would like to do this course and use Unity 2020, Penny has put together these resources for you.

Thing to know before you start

1
Introduction

This lecture introduces students to the course, the content and how to prepare.

2
Join the H3D Student Community

H3D has a bustling online student community.  Here's how to get involved.

3
FAQs

This lecture contains a list of FAQs asked by students in my courses.

4
Understanding Clients and Servers

This lecture provides a quick overview of client/server applications. We discuss the role of TCP/IP and how messages are transmitted between computers.  Also examined are the different network architectures and which ones are used for certain types of games.

5
Running Multiple Versions of a Program

When testing out client and servers it is essential to be able to run two versions of your program on the same machine.  This lecture explains how this is done.

6
WARNING! WARNING!

This lecture provides some sound advise for network programmers to reduce debugging heartache down the track.

Creating a Basic Client/Server Application

1
The Network Manager: Part 1

In this lecture the Network Manager is introduced.  Using a car model as the player character, you will learn how to setup a very simple client/network application on a single machine and send movement messages between client and server using the Network Transform and Network Identity Components.

2
The Network Manager: Part 2

In part 2 of this lecture you will complete the simple networked car driving example.

Dealing with Network Latency (Lag)

1
How Interpolation Works

This lecture examines how slow network connects can affect the play of a game and how this is resolved through the mathematical concept of interpolation.

2
The Network Transform

This lecture explains how the Network Transform component in Unity can be used to send rigid body movement messages around the network and sync player positions and rotations.

Customising Your Player Character

1
Setting Up Different Player Starting Positions

This lecture explains how the starting position in UNET work to ensure player characters don't spawn in the same place.

2
Attaching the Camera to Player's Camera

This lecture explains how a camera can be customised to follow the players local player such that a third person camera view can be established in a networked game.

3
How to Fix a Jittery Camera

This lecture covers the matter of camera jittery that can occur when a camera is asked to follow a character around.

4
Who's who? Adding Names Above the Player Characters

In this lecture, a label will be added to the scene and programmed to display the players name.  This allows each character in a network environment to be identified. 

5
Adding Names Part 2

This lecture completes the task of adding a player name above all networked characters in the game and demonstrates how to change the name and sync it around the network.

6
Further Customisation: Changing Colours Over the Network

Using the same concepts as adding a name to players in the networked game, this lecture adds the functionality of allowing a player to change the colour of their car's body.

7
Player Name Fixer

Because the player name is a canvas object it is separated from the network functionality of the player and as such when the player is destroyed the name is not.  This lecture shows students how to delete any objects that are still in the game environment and connected to the player but not network controlled when the player disconnects.

8
Syncing Values to a Late Client Connection

This lecture covers the situation where clients have customised their look and other settings and a late coming client connects.  In this case the syncvar hooks can't be relied on and must be called manually.

9
A Recap of Synchronising Character States around the Network

This lecture reiterates the process of changing the state of a character and then sending the appropriate message around the network such that the server and other clients are updated.

Putting in Some Practice: A Simple Shooter

1
Shooting Bullets Part 1

This lecture is the first of a 5 part series that shows how to create a shooting scenario in which bullets can be fired and do visible damage to another networked player.

2
Shooting Bullets Part 2

This lecture is the second of a 5 part series that shows how to create a shooting scenario in which bullets can be fired and do visible damage to another networked player.

3
Remote Procedure Calls

This lecture explains the difference between remote procedure calls that are run on the client and those run on the server.

4
Remote Procedure Calls Demonstration

This lecture explains how remote procedure calls work with a visual walk through.

5
Shooting Bullets Part 3

This lecture is the third of a 5 part series that shows how to create a shooting scenario in which bullets can be fired and do visible damage to another networked player.

6
Shooting Bullets Part 4

This lecture is the forth of a 5 part series that shows how to create a shooting scenario in which bullets can be fired and do visible damage to another networked player.

7
Shooting Bullets Part 5

This lecture is the fifth of a 5 part series that shows how to create a shooting scenario in which bullets can be fired and do visible damage to another networked player.

Humanoids and Animations

1
Synching Humanoid Animations

This lecture demonstrates how synchronised variables can be used to communicate around a network the animation state of a character.

Customising the Network Manager

1
Picking a Custom Character Player

This lecture begins the section on creating a customised network manager to perform tasks that are not default.   In this lecture the student will be shown how players can pick different characters for their player-character.

2
Registering Callback Functions

This lecture visually steps through the custom network manager setup and explains how each method runs and affects the messaging procedure.

3
Selecting a Player Character Before Connecting

This lecture expands on the custom character selection and demonstrates how each player can select their own character before connecting.

4
Changing Player Characters After Connection

This lecture shows how to add even more functionality to player-character selection by allowing a player to change their avatar at anytime, even while they are in the networked game.

5
Customising Across Multiple Characters Part 1

This lecture demonstrates how a player character can be customised during game player. In the example given the player can change the colour of their character's shirt and this is synced across the network.

6
Customising Across Multiple Characters Part 2

This lecture shows how custom settings applied to one player character can be maintained and applied when  the character model is changed.  In this case, when the shirt colour is changed for a female model to green and the player changes to a male model, the new model will automatically get a green shirt.

7
Spawning a Networked Object

Here you'll find some information on how to spawn an object and have it appear across all clients.

8
Character Customiser Solution and Updates

This article provides the solution code for this section and discusses some changes needed to use the Network Animator component instead of writing your own code to sync character animations around the network.

Creating a Game Lobby

1
Adding a Lobby to an Existing Networked Game.

This lecture demonstrates how the Unity Lobby asset can be imported into an existing network game and integrated into its functionality.

2
Passing Lobby Values to the Game Scene

This lecture demonstrates how to make a lobby hook class that can relay player settings from the lobby to the game scene.  This allows the player to set their name and colour in the lobby and have those properties automatically applied to their player-character in the game scene.

3
Customising the Lobby

This lecture explains how the default Unity network lobby can be customised with a different visual design.  In addition new properties are added as settings for the player that can then be used to further setup their player character.

4
Coding the Custom Lobby

This lecture explains who to link the customised values added to the lobby player to the player character by following existing constructs in the lobby player class.

5
Matchmaking

This lecture explains the matchmaking process and demonstrates how a game can be connected to the Unity Matchmaking Services so players of the game don't need to know the IP of the server and can choose a list of servers to connect to.

Helpful Things to Know

1
Finding Your IP Address

This lecture covers the intricacies of IP addresses and how to determine which IP address to use when trying to connect to a server. Readers of this should also be aware of issue raised with respect to Server IP Binding in the next lecture.

2
Advanced Networking Ideas

This lecture methodically works through all the settings for the Network Manager that have not been covered in the videos for this course.  They are settings that can mostly be ignored when you are starting out.

Final Words

1
Where to Now?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.6
4.6 out of 5
952 Ratings

Detailed Rating

Stars 5
569
Stars 4
276
Stars 3
73
Stars 2
24
Stars 1
10
781ecf42abac6039bd170b3717e03a94
Course available for 2 days
30-Day Money-Back Guarantee

Includes

6 hours on-demand video
11 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion

External Links May Contain Affiliate Links read more

Join our Telegram Channel To Get Latest Notification & Course Updates!
Join Our Telegram For FREE Courses & Canva PremiumJOIN NOW