
Learn to create and host a dedicated game server with Unity multiplayer, .NET 6, and the Light Net Leap Networking library, implementing strongly typed client-server communication, packet serialization, and matchmaking.
Set up your development environment with free tools: Unity, Visual Studio Community, Visual Studio Tools for Unity, Unity Hub with long-term support, and Docker Desktop for cloud deployment.
Create a new Unity project, set up mobile-oriented 390x844 layout, import the white knit lib, and implement a connect and send UI to communicate with a server.
Create a singleton network client in Unity with LiteNetLib, implementing the init listener, connecting to server at port 1950, and sending UTF-8 data with reliable ordered delivery for client-server communication.
Create a dedicated game server using dotnet 6 and LiteNetLib, implementing the network server class, starting a listening port, and handling connections and data.
Enable client-server integration by initiating a Unity server, accepting client connections, and exchanging messages with an event-driven net manager using reliable ordered delivery.
Design and implement a Unity UI for a game, translating Figma designs into a pixel-perfect canvas. Create background, title with Text Mesh Pro, and prepare for a custom font configuration.
Learn to install the Inter font in Unity by downloading from Google, adding it to a Fonts folder, and generating a TextMesh Pro font asset with bold and italic variations.
Design a login user interface with username and password inputs, visible placeholders, and an error message area; implement a disabled-to-enabled login button and layout tweaks.
Wire up text mesh pro username and password inputs, validate with a username regex and max lengths, store values, and enable the login button with updated text when valid.
Enable and test login form validation by wiring password and username errors to their inputs, enforcing length checks, applying a regex for username, and displaying errors when validation fails.
Create a loading indicator in Unity using a three-circle animation with lean tween, triggered by the walking button and shown until a server response or scene redirect.
Learn how to handle the walk in button click by disabling the button, enabling the warning UI, and initiating a server connection to authenticate while waiting for a response.
Learn how to send a real network packet by creating a serializable net packet, defining packet types, and implementing serialization for server–client communication in a Unity multiplayer setup.
Implement an OnServerConnected event in Unity multiplayer, subscribe and unsubscribe safely, and update the is connected flag to stop the waiting loop.
Set up a dependency injection container on the server, configure a service collection, register the network server as a singleton, and prepare to start using the container for the server.
Implement on network receive by wiring a service provider to create a scope, resolve packet types via a registry, and invoke appropriate handlers with error handling and reader recycling.
Resolve packets by implementing a packet registry that maps packet types to classes using reflection, instantiate and deserialize packets with a net packet reader, and wire it through dependency injection.
Design and register packet handlers for each match by building a server-side handler system, using a simple IPacket interface and a HandlerRegisterAttribute with a reflection-driven HandlerRegistry.
Register packet handlers in the DI container with a service collection extension, using reflection to filter and register handlers as scoped. This enables authorization handling and reinforces separation of concerns.
Implement a login and register flow for a Unity multiplayer server using an in-memory user repository and a request handler that converts packets to a strongly typed model.
Implement and debug user connections in a Unity multiplayer server by wiring a users manager, handling net peer connections, setting users online, and logging connection events.
Learn how to notify a new player's authentication outcome and broadcast lobby status to other players by implementing server-client packets, serialization, and reliable messaging in Unity multiplayer.
Demonstrates OnAuth packet handler in Unity multiplayer, implementing unauthorised handover by registering and resolving packets, then invoking server and client handlers to authenticate and transition to the next scene.
Implement on auth fail packet handler to emit an auth fail event when credentials are rejected, and update the user interface by disabling the walk button and displaying an error.
Design and prepare a unity multiplayer lobby user interface with header, find opponent button, top players list (usernames and scores), online count, and a footer, ready for coding next.
Reinforce how to request server status in a Unity multiplayer setup by creating a net server status request, wiring UI components, and handling server responses.
Implement a server status request handler returning a net server status with players count and top players, using a serializable player struct and data from user repository and players manager.
Implement client-side server status handling in Unity multiplayer by introducing a server status request handler, triggering a user interface refresh that rebuilds top players list in lobby, ignoring non-lobby scenes.
Populate player statistics in Unity Multiplayer by creating a layer row ui component, displaying online status, username, and score for each top player.
Wire a label reference for the players online label, use text mesh pro and string interpolation to show the total players online, then test with the in-memory repository.
Use ParrelSync to run parallel Unity instances for multiplayer testing by cloning your project, installing via git URL or package manager, and synchronizing changes.
Enable run in background to let the Unity multiplayer server update new players immediately as they join. Configure in edit project settings, then restart the editor and server to apply.
Implement real-time disconnect handling in a Unity multiplayer setup, updating lobby screens when a player goes offline by notifying the server and other players.
Wire a logout button in the footer, attach an on click listener in Unity UI, disconnect the network client, and load the world scene to verify logout across players.
Hook the find opponent button to send a server request and register the player in the matchmaking pool, while showing a loading and warning indicator in the lobby user interface.
Implement a find opponent button in Unity multiplayer, wiring onClick listeners to show and hide the find opponent UI, add cancel functionality, and send a network request.
Define and implement find opponent request and cancel find opponent request messages and their handlers, set up server-client packets, test with console logs, and prepare for server-side matchmaking.
Register players into a matchmaking pool via a matchmaker and request objects, start timing, and kick off basic matchmaking to pair players, with injection and logging for future improvements.
Implement a do matchmaking method by iterating the pool to find matches, queue them in a matched-requests list, then register the game and send a start message.
Create a games manager to track active games, register and locate sessions by username, remove matchmaking requests from the pool, and update connections with the assigned game id for play.
Implement the on start game event by creating a start game bucket with x user, all user, and game id, then serialize and notify both clients.
Implement the OnStartGame packet handler on the client to transition to the game scene, register the game locally, and prepare for matchmaking.
Design the game UI in Unity by building a static header with score and player names, a three-by-three playfield grid, and placeholder o/x icons with a timer.
Implement a singleton game manager in Unity to hold session and active game data, persisting across scenes. Bind the user interface to show usernames and scores with text mesh pro.
Create turn indicator in a Unity multiplayer game by updating a Text Mesh Pro label to show 'your turn' or 'enemy turn', color-coded by player type and animated with LeanTween.
Create and wire a board UI in Unity by instantiating cell prefabs, handling cell clicks, and sending a mark cell request to the server to update game state.
Define server-side mark cell request and on-mark response in a Unity multiplayer Tic Tac Toe game, including net message definitions, enums for outcome and win line, and a validator-driven handler.
Implement the MarkCellRequest structure and its validation by injecting user and game managers, building a 3x3 MarkType grid, and ensuring the actor marks an unoccupied cell.
Learn how a multiplayer tic tac toe game runs all logic on the server—marking cells, checking for wins or draws, and validating outcomes—and then reports results to both clients.
Handle none, draw, and win outcomes for mark cell actions in a Unity multiplayer server, switch the current player, and increment wins and user scores.
Implement the on mark cell client handler to visualize server updates by updating the board UI, swapping the current player, and animating the x marker.
Subscribe to the on mark cell event to update the turn text, and show the end screen on win or draw with a coroutine delay and server-side score updates.
Learn to create an animated win line in Unity’s game UI by building an empty line object, attaching an image, and scripting a draw animation triggered by a win event.
Explore building a complete multiplayer flow in Unity, including win/lose screens, a play again sequence, awaiting or accepting another session, and handling opponent quit scenarios.
Explore building a modal UI in Unity multiplayer by creating a blur shader, darkness layer, and a popup panel with text and buttons for play again, quit, and awaiting opponent.
Display the end round modal with a brief delay and update the score. Create and wire the end round UI to initialize with winner and enable play again.
Implement a modal pop-up animation by scaling the root panel from a smaller size to one using lean tween with out-bounce easing, triggered on enable, and test in multiplayer scenes.
Wire a play again button to send a rematch request to the server, define net play again messages, and notify the opponent to start a new match.
Implement the on play again handler to manage client–server messaging, hide the play again button, show the accept option, display the opponent's request, and prepare for the next match.
Implement a play again rematch flow in Unity multiplayer by wiring an accept button, sending an accept play again request, and coordinating a new round with server and client messages.
Implement the on new round handler by subscribing to the event, resetting the board user interface, and re-enabling inputs for a fresh round.
Implement surrender functionality in a Unity multiplayer server, defining surrender and quit packets, wiring the surrender button, and executing server-side win logic, opponent score updates, and client notifications.
Create and wire a packet handler named on surrender, register the bucket type, and invoke the on surrender message to display the end around UI with the winner.
Implement a quit button listener, send a quit game request to the server, close the game and notify the opponent, while unsubscribing old handlers and updating the end around UI.
Build a standalone Unity client with a windowed resolution, compile a build, run multiple instances to simulate multiplayer sessions, manage turns and quit UI, then deploy on Azure.
Deploy the game server with Docker by building a .NET Core image via a Dockerfile, pushing it to Docker Hub, and exposing the UDP port for clients.
Host your Unity multiplayer server in the cloud with a Digital Ocean droplet, install Docker on Ubuntu, run your image, and explore CI/CD automation with GitHub Actions or Azure DevOps.
I will be completely honest with you.
In the past, I have been struggling for months to find good information on internet on how to create and host real dedicated game server. There is hardly any well structured information on this topic. Now that I have a decent understanding on the topic I've decided to share it with you. I really hope this course will help you lay the foundation on your journey in the world of online multiplayer games.
Here is what you should expect in the course:
1. In the first section we are creating very minimal setup of our client-server communication using Unity3D, .NET 6 and the networking library LiteNetLib.
2. After we are done with the proof of concept, or as a like to call it "walking-skeleton" project, we will continue by laying the foundation of a strongly typed client to server communication. We will implement packet serialization and deserialization and will make it so the logic that handles different packets is separate in different packet handlers and it will use strongly typed C# structs.
3. Once the networking layer is done, we will work on two core scenes that are essential for any multiplayer game. Login and Lobby scenes.
4. In the login scene, we will allow the players to identify themselves and register in our server. We will handle user input validation and we will give the user visual feedback in the form of loading animation.
5. In the lobby scene we will create a sorted list of the top 10 players and will show their statuses (online or offline). We will also show the current total players count on the server. In addition to that we will update the list on all clients when a new player joins or an existing one turns offline.
6. After we are done with that, we will enable the players to register in our matchmaking pool and search for opponents by pressing the "Find Opponent" button.
7. Once a match is found, we will redirect the players to the actual game scene, where they will be able to play the classic game of Tic Tac Toe.
8. We will implement beautiful animations and handle corner cases on both server and client-side.
9. After one game session is complete we will allow the players to request to play again and then of course give them the ability to accept or reject the offer.
10. And last but not least, once we are ready with the game client and server, we will deploy our server to a cloud provider and will connect to it from the client.
11. If there is interest in the course I will expand it with additional bonus sections, depending on the needs of the students.
Since this is my first course in Udemy, my presentation skills are far from perfect and I apologize for that, but I still believe that there is valuable information that you can benefit from. I really hope you enjoy it.
Are there any course requirements or prerequisites?
Basic understanding of Unity3D and .NET
A passion and desire to learn more about how to create online multiplayer game.
Who this course is for:
This course is intended for anyone that is interested on creating a custom dedicated server using low-level networking. The course itself is not for complete beginners as do not cover very basic concepts like for example: How to install software or the very basics of C# programming. But I still believe that even if you are beginner you will be able to follow up, because the course is basically a step-by-step guide.