This course 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:
This lecture introduces students to the course, the content and how to prepare.
This lecture contains a list of FAQs asked by students in my courses.
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.
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.
This lecture provides some sound advise for network programmers to ensure debugging heartache down the track.
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.
In part 2 of this lecture you will complete the simple networked car driving example.
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.
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.
This lecture explains how the starting position in UNET work to ensure player characters don't spawn in the same place.
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.
This lecture covers the matter of camera jittery that can occur when a camera is asked to follow a character around.
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.
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.
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.
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.
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.
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.
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.
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.
This lecture explains the difference between remote procedure calls that are run on the client and those run on the server.
This lecture explains how remote procedure calls work with a visual walk through.
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.
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.
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.
This lecture demonstrates how synchronised variables can be used to communicate around a network the animation state of a character.
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.
This lecture visually steps through the custom network manager setup and explains how each method runs and affects the messaging procedure.
This lecture expands on the custom character selection and demonstrates how each player can select their own character before connecting.
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.
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.
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.
This lecture demonstrates how the Unity Lobby asset can be imported into an existing network game and integrated into its functionality.
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.
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.
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.
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.
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.
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.
Professor Penny de Byl is the author of the best selling Unity instructional books; Holistic Game Development and Holistic Mobile Game Development. Penny has been teaching at universities in Australia and Europe since 1993. During her time as a teacher, Penny has won numerous awards for her teaching including the Australian Government's Office of Learning and Teaching Excellence in Teaching and the Unity Mobile Game Curriculum competition. Her areas of expertise include game development, computer graphics and artificial intelligence.