Welcome! I’ve made a new Series 1 showing how to make a multiplayer game using Unity 2017. S1 is aimed at intermediate devs and the complete S1 is only available on Steam and includes all videos and project folders.
I cover the following topics:
How to use the default Network Manager to create Direct Connection (LAN Games) and Match Maker (Public Games). Note that Unity’s match making service is a paid service and once a developer exceeds the free concurrent user count, the developer has to pay for additional concurrent users.
How to write your own Custom Network Manager so you are not reliant on the default HUD and Network Manager. You will create Direct Connection and Match Maker (Public) games.
Enable your Custom Network Manager to allow for multiple player prefabs and being able to select scenes.
How to use Commands, ClientRPC, and Syncvar with hook function.
How to use the Network Transform and Network Animator components.
How to sync fundamental game mechanics such as; shooting, health and damage.
How to implement network chatting.
How to implement networked AI movement.
S2 is only available on Steam and is aimed at intermediate devs wanting to see how to setup their own master server and other stuff like syncing animation smoothly across the network. S2 was made in Unity 4 so it is really out of date now. I’m planning a new project to replace the old one on Steam.
S3 for Unity 5 is a major FPS tutorial series covering a wide range of systems, including inventory, object destruction, NPC AI, vehicles the player can drive, etc. It is single player only. S3 is aimed at devs who are completely new to Unity and coding. The complete series is available on YouTube and also on Steam. The Steam edition includes the project folders.
Thank you. I’ve released three videos so far and I’m a few days away from releasing video 4 where we’ll start building the multiplayer system. Please feel free to leave any feedback to help me improve subsequent videos. I have been told that I sound a bit robotic so I’ll be working on that.
I’ve just released Video 4 and I had to go into overdrive to release it in such a short time. Video 4 is where we’ll establish our multiplayer system and this is what we were all waiting to see and I just couldn’t leave you hanging any longer. It’s a big video and is one of the most important in this series. From Video 4 onwards our series 1 will become more and more interesting. So stay tuned.
Just a quick update. I’m aiming to publish Video 5 “Our Spawn System” by Thursday the 16th of February. In that video we will write the SpawnScript, setup spawn points, setup blue team and red team, reconfigure our player for multiplayer, and deal with locking and unlocking the mouse cursor.
Thank you so much for putting out this video series! I’m only up to video two, but I’m really impressed.
The preview of the game in video one really got me excited about watching the series. There are things in the game that I can use for my own project, that I’m sure others can use as well. I think the pace is just right, I have no problems with sound of your voice and everything you’re pointing out is really helpful. You are very comprehensive, and I really appreciate every little detail - but perhaps that’s just me. lol
This is really fantastic! You’re going to save me a lot of time in getting my prototype multiplayer game up and running.
You’re welcome and I really do hope that it helps with your project! Someday when you’ve completed your prototype multiplayer project please do drop us all a link, and if you ever find that the going gets tough for you then don’t get discouraged or give up, because that is precisely when you’re about to overcome the challenge.
I’m working on Video 6 Health Damage System and I’m aiming to release it by no later than the 23rd of February. Hit detection in multiplayer is much more complex than hit detection in single player and in the upcoming video I’ll be showing you step by step how to build a solid hit detection and damage application system that will work even when the ping of some players is high.
In Video 6 we will do a lot!
We will write our own class, and setup a PlayerList that uses our class to store vital information about each player and this list will be kept uptodate across the network.
Write a PlayerName script to manage the player’s name across the network.
Write our HealthAndDamage script to handle damage application and the player’s health, and we will write it in a way that gives us solid damage application, so that an attacking player is unlikely to experience a situation where they are shooting at an enemy but their hits are not registering.
Update our FireBlaster and BlasterScripts so that our blaster projectile can damage and destroy enemy players.
I’m expecting that this video will be well over two hours in length, so thanks for your patience .
No worries. I’ve been having fun building the game as I watch, which takes a bit longer than the video itself. Wish I had more hours in the day. I’m currently in the middle of video 4 and should be caught up by Monday. Good stuff!
Thank you for the well documented code. As I’m really new to programming and Unity, (like 3 weeks new), having you walk through what each line is doing and what each of the pieces inside said line of code is actually doing helps me out tons.
I also like how you focus on gameplay and now graphics.
One final item. Try not to feel pressure to meet deadlines to get them out in X time. I can’t speak for everyone here, but I think most of us will take quality over quantity!
I found an interesting supplement to this video series on Unity Cookie that demonstrates how to connect to the Unity master server, register the local server as a host, and from the client side, list the hosts to which a player can connect.
Good evening. I’m working through your lessons and have been able to reproduce them so far, (up to video 3).
I’m going back through what I wrote following the lessons and really trying to understand the syntax and for lack of a better term, “what” I am typing. I’ve been using the command ’ trick highlighting words and reviewing the docs online and this is what I have come up with so far.
If the author or others reading this post has time to review my comments, I’d appreciate having any errors pointed out to me or perhaps better ways to phrase my statements to make them clearer.
using UnityEngine;
using System.Collections;
/// <summary>
/// This script is attached to the player
/// and it causes the main camera to continuously
/// follow the CameraHead GameObject
/// </summary>
public class CameraScript : MonoBehaviour {
// variables start ______
// create a new variable called myCamera and set the "type" to Camera
private Camera myCamera;
// create a new variable called cameraHeadTransform and set the "type" to Transform
private Transform cameraHeadTransform;
// variables end ______
// Use this for initialization
void Start ()
{
// link the variable to a specific camera in the scence, the "main" camera in this case
// reading: variable myCamera is equal to a "generic camera" and then the specific camera in the scene
myCamera = Camera.main;
// link the variable to a specific GameObject in the scence, the CameraHead GameObject in this case
// reading: variable cameraHeadTransform is equal to the position of the Game Object CameraHead
cameraHeadTransform = transform.FindChild("CameraHead");
}
// Update is called once per frame
void Update ()
{
// Make the main camera in the scene follow the position
// and rotation of the CameraHead GameObject
// reading: variable myCamera's position in the scene is equal to the position of the variable cameraHeadTransform
myCamera.transform.position = cameraHeadTransform.position;
// reading: variable myCamera's rotation in the scene is equal to the rotation of the variable cameraHeadTransform
myCamera.transform.rotation = cameraHeadTransform.rotation;
}
}
I’ve just released video 6 where we implement our Health and Damage System and this video is super important for our prototype game! Thanks for all the helpful feedback everyone and I’ll try and reply to your messages and comments as and when I get enough time.
Thank you so much for posting a link to this tutorial! It is really outstanding and if you find other tutorials out there like this one then please let us all know about it. I believe it would be a really good idea to make use of the Unity Master Server in the next series for Gamer To Game Developer.