From the course: Unity 5: Network Gaming
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Multiplayer health - Unity Tutorial
From the course: Unity 5: Network Gaming
Multiplayer health
- [Instructor] During the introductory chapter of this course we talked about server versus client authority. Working with health is pretty much always appropriately done with the server authority methodology. Right now each client is responsible for reporting its own health status to the user. Our next step is to modify our code so that the server tracks each player's health and, as such, the server is the authority on the current health state of each player. Since server versus client authority is an important concept I want to drive this point home. There are things that are fine as client authority, for example, the position of a fired projectile. We can instantiate it at the server level but once instantiated, letting the local clients perform the computations to move the projectile individually on each client is fine. The server doesn't need to be notified until the projectile hits something at which stage it should be reflected in the tank object, not the projectile. If the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Project overview3m 15s
-
(Locked)
Set up the Network Manager2m 11s
-
(Locked)
Network identity3m 1s
-
(Locked)
Testing the game3m 46s
-
(Locked)
Network transform6m 58s
-
(Locked)
The local player6m 26s
-
(Locked)
Instantiate projectiles6m 58s
-
(Locked)
Firing projectiles6m 5s
-
(Locked)
Multplayer projectiles5m 2s
-
(Locked)
Adding a health indicator, part 12m 53s
-
(Locked)
Adding a health indicator, part 23m 44s
-
(Locked)
Adding a health indicator, part 34m 46s
-
(Locked)
Multiplayer health5m 54s
-
(Locked)
Fragging the enemy5m
-
(Locked)
Respawning6m 14s
-
(Locked)
-