Ever wanted to make your very own multiplayer games? The free Unity Game Engine is making the process easier than it has been with its new Netcode For GameObjects (NGO) framework.
In this course we'll create a multiplayer top-down shooter that you can modify and turn into your own fun creation and play against 20 or more people simultaneously online. In the process you'll learn how to create and deploy a dedicated server with matchmaking.
Ever wanted to make your very own multiplayer games? The free Unity Game Engine is making the process easier than it has been with its new Netcode For GameObjects (NGO) framework.
In this course we'll create a multiplayer top-down shooter that you can modify and turn into your own fun creation and play against 20 or more people simultaneously online. In the process you'll learn how to create and deploy a dedicated server with matchmaking.
We’ll be making a .io style game (like slither .io and agar .io), that can accommodate dozens of players. Through that process you’ll build the skills to make your own competitive or cooperative multiplayer game in any genre that interests you.
You’ll learn about networking and how to make the game a multiplayer. You’ll start building the core gameplay, making your tanks move, shoot, collect coins etc. Later you’ll add polish and more advanced features like leaderboards, mini maps and bounties.
You’ll take your game online using UGS (Unity Gaming Services) so players can connect over the internet without the need to port forward.
Finally you’ll learn how to make your game deployable as a dedicated server, so none of the players have to host the game. And you’ll learn to integrate matchmaking, so players can queue up, be matched together and a server spun up for them to play on.
You’ll get full lifetime access for a single one-off fee. The creators are qualified and experienced with modelling and coding, so are able to explain complex concepts clearly, as well as entertain along the way.
All students have access to the Q&A where our Instructors, Teaching Assistants and Community are ready to help answer your questions and cheer on your success.
Jump in and start creating your own multiplayer game now. You’ll be playing it with your friends in no time.
In this video (objectives)…
Rick and Nathan welcome you to the course.
In this video (objectives)…
Download Unity Hub and Visual Studio Code, including the extensions for C# and Unity Code Snippets.
In this video (objectives)…
We learn about how online multiplayer games work behind the scenes and discuss how we are going to structure our project.
In this video (objectives)…
We download and install the packages that we will need for our NGO project.
In this video (objectives)…
Lucy invites you to join us in our various community support forums in order to ask questions, connect with other students and share your progress.
In this video (objectives)…
Any time we change our project during a lecture we will commit that change to a public source control repository for students to access. In this video we show you how to access that content.
In this video (objectives)…
Nathan introduces you to the section of the course where you’ll be creating the Core Gameplay features.
In this video (objectives)…
We import graphical assets for our game that we can use for the player, pickups, and terrain.
In this video (objectives)…
We create a script to handle reading input that we can then use to control our tank’s movement and firing.
In this video (objectives)…
We give clients authority over their movement as lag compensation and client-side prediction for movement is beyond the scope of this course. Everything else will be server authoritative.
In this video (objectives)…
We create the tank’s movement script that we drive via a rigidbody to handle physics collisions for us as well as adding the ability to turn with the A and D keys.
In this video (objectives)…
We create the tank’s aiming script that will rotate the barrel to face the mouse cursor ready for firing.
In this video (objectives)…
We create networked and dummy projectiles ready to be fired in the next lecture.
In this video (objectives)…
We create a script to handle firing dummy projectiles for the clients and real projectiles for the server.
In this video (objectives)…
We re-visit our projectile firing script and make some improvements to fire rate and collisions.
In this video (objectives)…
We create the health script that we can use for our players as well as any non-player objects that need to be able to take damage.
In this video (objectives)…
We create a script to display health above our players that updates whenever the health script’s event is invoked.
In this video (objectives)…
We create a script for the server-side projectile that deals damage if it collides with a gameobject that as the health script.
In this video (objectives)…
We create the base coin script that we can then inherit for respawning and bounty coins.
In this video (objectives)…
We create the Coin Wallet component to handle storing and collecting coins for our players.
In this video (objectives)…
We create a Coin Spawner script that spawns all the initial coins in when the game starts and also handles re-spawning them when they are picked up.
In this video (objectives)…
We take time this lecture to start creating our gameplay map and highly encourage you to create your own assets/design your own map.
In this video (objectives)…
We add a cost to firing, some particle effects, and improve our fire-rate logic to be more robust.
In this video (objectives)…
Nathan introduces you to the section of the course where you’ll be getting connected to other players online.
In this video (objectives)…
We create the main menu scene and UI for our game.
In this video (objectives)…
We create an entry point for our networking logic that creates the necessary managers depending on whether we are a client, server, or host.
In this video (objectives)…
We create a script to handle authenticating our players with UGS before letting them move to the main main scene.
In this video (objectives)…
We revisit out authentication wrapper and implement error handling as well as making the script more robust.
In this video (objectives)…
We set up our project to be able to use Unity’s Relay service so that people can connect to our game without the need to port-forward to allow external connections.
In this video (objectives)…
We allocate a Relay when a player starts hosting a game.
In this video (objectives)…
We implement the ability to join a Relay created server by entering a join code that lets us connect.
In this video (objectives)…
We create the UI to display all active lobbies that we can then use to join a selected lobby.
In this video (objectives)…
We write the logic to create a lobby when allocating a relay.
In this video (objectives)…
We query active lobbies to display in a list that players can click to connect to.
In this video (objectives)…
We add a screen for players to enter their display name before changing to the main menu scene.
In this video (objectives)…
We create a method that handles receiving data from clients when they try connecting to the server.
In this video (objectives)…
We create methods to handle network events that are triggered when clients connect/disconnect to the server.
In this video (objectives)…
We make some networking improvements including being able to enter play mode from any scene and it will automatically switch to the bootstrap scene.
In this video (objectives)…
We properly handle what happens when the the application shuts down so everything can be cleaned up.
In this video (objectives)…
Nathan introduces you to the section of the course where you’ll be returning to implement more gameplay features such as a leaderboard and minimap.
In this video (objectives)…
We give each player prefab their own camera that follows their tank around the map.
In this video (objectives)…
We create a script to read each player's name on the server and sync that to clients to display on their UI.
In this video (objectives)…
We create spawn points that we can place in our gameplay scene and the server will assign players to these spawn points when they join the game.
In this video (objectives)…
We handle the event that is triggered when a player is killed to then respawn them at a random spawn point in the scene.
In this video (objectives)…
We create the leaderboard UI and start writing the script that will populate and manage it.
In this video (objectives)…
We create our own custom data type that can be synced over the network.
In this video (objectives)…
We listen for when players are spawned/despawned and add/remove them from the leaderboard.
In this video (objectives)…
We update the leaderboard entities to display the names of each player in the match.
In this video (objectives)…
We listen for when players gain/lose coins and update the leaderboard accordingly.
In this video (objectives)…
We make the final adjustments to the leaderboard by adding sorting and showing/hiding based on how many players are in the match.
In this video (objectives)…
We make players lose a portion of their coins on death.
In this video (objectives)…
We drop a portion of your coins on the floor as bounty coins when defeated.
In this video (objectives)…
We start creating healing zones in the scene where players can go to and spend coins to restore health.
In this video (objectives)…
We finish creating healing zones which will heal players until they run out of charge, after which they will start a cooldown before being able to heal again.
In this video (objectives)…
We create a minimap that will help players navigate the game a lot easier as they can see where other players are as well as healing zones.
In this video (objectives)…
We wrap up the section by making some small improvements to various features that we’ve worked on over the recent lectures.
In this video (objectives)…
Nathan introduces you to the section of the course where you’ll be setting up your project to be deployed as a dedicated server on UGS along with integrating matchmaking.
In this video (objectives)…
We learn about dedicated servers and plan how we’re going to set up our project to be deployed to UGS Game Server Hosting.
In this video (objectives)…
We import a few wrapper classes that will make our lives much easier when trying to interact with the UGS API’s.
In this video (objectives)…
We get our project ready for UGS hosting by creating our own dedicate Linux server build.
In this video (objectives)…
We use the online UGS dashboard to deploy our server build to their “Game Server Hosting”.
In this video (objectives)…
We create the UI that will display a player’s time in queue, their queue status, and buttons to start/stop queuing.
In this video (objectives)…
We use the matchmaking UI we created to put a player into the matchmaking queue when they hit the button on the main menu.
In this video (objectives)…
We handle what happens when UGS returns a matchmaking ticket to for either joining a match or rejecting if there was an issue.
In this video (objectives)…
We set up our game server to handling backfilling players when there is room for more players to join.
In this video (objectives)…
We are finally able to test our matchmaking system using our deployed dedicated server build on UGS.
In this video (objectives)…
We make a few changes to our matchmaking system to make it display the time in queue and to make it more robust.
In this video (objectives)…
We add some VFX to our tank so it will leave behind a trail of track marks on the ground as well as smoke coming out from behind.
In this video (objectives)…
We make sure our dedicated server is running healthily on UGS so that it can stay up for prolonged periods of time without crashing.
In this video (objectives)…
We revisit some of our code that can cause errors in certain edge cases and make sure to handle them correctly.
In this video (objectives)…
Nathan introduces you to the section of the course where you’ll be creating a second matchmaking queue with teams so that players can work together to achieve victory.
In this video (objectives)…
We add the ability for players to queue up for either solo or team queue and allow them to make their hosted lobbies either public or private.
In this video (objectives)…
We adjust the code that the server executes when players join/leave a matchmade game to properly handle team assignment.
In this video (objectives)…
We assign different colours to each team and change the renderer colour for the tanks to match the team colour.
In this video (objectives)…
We allow projectiles to pass through players that are on the same team as us.
In this video (objectives)…
We add a second leaderboard to display the team scores when playing a matchmade team game.
In this video (objectives)…
We're finished with the course - good luck with your online multiplayer projects, and please share what you come up with!
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.