This is the eighth blog in our Games Focus series, which highlights key product development initiatives for the year ahead and beyond. In this installment, we cover the status, upcoming release plans, and future vision for Unity Multiplayer Networking.
Hi there, my name’s Kiki Saintonge and I’m a product manager on the multiplayer team – the one focused on delivering Unity’s Netcode for GameObjects solution.
I’ve been at Unity for about a year, but I’ve been a hobbyist and indie Unity developer since 2013. My passion lies in games, particularly playing the inspiring things y’all make. I’m pretty excited to chat about our multiplayer solutions in this post today, especially since so many of you have voiced the need and desire to have a more complete and accessible solution to multiplayer development. We’re closer than you think.
Let’s be honest: Making multiplayer games can be really hard, from designing the mechanics to implementing and testing. You have to account for so much – latency, packet loss, handling scene management, what should or shouldn’t be sent over the network – much of which is difficult to track or simulate. Even our third-party networking solutions need third- (fourth?) party tools just to see what the heck is going on.
Building a complete networking system for your game should be just like the game itself: unique and refined to fit your game’s experience.
With that in mind, we wanted to build a netcode solution that’s flexible enough to accommodate every core aspect of your multiplayer game, while also making it easier for you to use third-party tools or services if you need to. This is the fundamental goal of our netcode solutions.
It’s also important to keep in mind that with multiplayer development comes services and scale, two things you might not have thought about in the context of single player or co-op. Unity Gaming Services is our recently launched platform that includes Game Server Hosting (Multiplay), Matchmaker, Relay, and Lobby services. It was designed to give you all the tools you need to build solid foundations, create engaging player experiences, and drive game growth, all within the same integrated ecosystem.
We announced some amazing netcode solution releases this year. Our first major release of Netcode for GameObjects is now available in 2020 and 2021 LTS.
This GameObject-based Netcode solution helps you get started building small-scale co-op multiplayer games. However, if you’ve built your experience using DOTS (Entities), we’re also pleased to announce our Netcode for Entities solution coming to the 2022 Tech Stream, which helps you get set up for a larger-scale multiplayer experience. Look for our next post in this series to learn more about that release.
These stacks cover a wide foundational start to multiplayer development. Together, they make up one step of many to get you on your feet with multiplayer games. These releases also are focused specifically on critical networking scenarios, like abstracting how to communicate to servers and clients, sending object data across the network, and input handling.
This release also supports some essential tools that allow you to track the packet loss, size, and latency of networked objects. Network Profiler is an extension to the Profiler that’s built into the Editor, and Runtime Network Stats Monitor (RNSM) is a customizable lighter-weight “Profiler” view of the network states that can be run on standalone builds for playtests.
You can install these tools through our com.unity.multiplayer.tools package in-Editor.
All of our Netcode stacks – yes, that includes Entities – are built on top of our Transport layer. This layer is netcode-agnostic and can be utilized with any solution.
Unity Transport Protocol (or UTP) extends the user datagram protocol with added support for Unity Relay and extra security using DTLS. This layer works across Windows, Mac, Linux, iOS, Android, and all major consoles.
We also provide some light network simulation capabilities through our transport package’s Debug Simulator properties. This allows you to throttle or simulate latency or bandwidth issues when testing in-Editor.
If you’re looking to get direct access to this lower-level networking library you can install it directly via the com.unity.transport package.
Although Netcode for GameObjects is relatively new, there are already games being built with it.
The wonderful team over at Fika Productions with Team17 are working on a beautifully hand-drawn game, Ship of Fools. It’s a fast-paced multiplayer co-op game of nautical persuasion developed completely in Netcode for GameObjects.
We’re constantly looking to cover gaps and demystify what’s happening on the network with multiplayer tooling.
Multiplayer Play Mode would be a big first step in making multiplayer development a first-class Editor experience.
The goal of this multiplayer tool is to “just work” once you enter play mode. It offers the same experience as the single-player workflow, but now you can have up to four clients running within the same Editor session, each receiving its own console information and able to be differentiated with a network-based tagging system.
Network Simulator is another feature we’d like to bring up from the Transport layer and expand into a more fully functional tool with a UI that lets you introduce lag spikes, set ping rates, trigger connections/disconnections at will, and even customize certain networking scenarios to run during playtests.
We’re looking at getting our Transport package better integrated with Burst, as well as supporting WebSockets.
Having a dedicated server is the core to many multiplayer games, and it comes with the need for more fine-grained control of what kind of headless server you’re building.
We’ve begun to investigate the dedicated server workflow. This starts with giving you more control and clarity over which assets you want within a server and which you do not. Essentially, you’re selecting the content you want in your server builds, which saves you time and potentially bandwidth in the long run.
Want to see the status of these features and more on Netcode for GameObjects? Check out our multiplayer networking roadmap to see what’s included in 1.0 and what’s in the works for future releases. You can also check out our recent Unite 2022 Roadmap session for an overview across the Unity ecosystem.
Creating multiplayer games is not easy, and it’s common to feel overwhelmed when exploring the development of a multiplayer game – even with SDK docs provided.
It’s our goal to equip and support you with the tools to build great multiplayer gaming experiences for your players. Part of that promise involves providing not only the foundational networking technology but also the documentation and educational templates, such as Boss Room, you’ll need to understand its application.
There are many resources available today that you can use to learn more about Unity multiplayer solutions.
Boss Room is a small-scale cooperative game sample project built with Netcode for GameObjects. It’s designed to be used in its entirety to help you explore the concepts and patterns behind a multiplayer game flow.
We’re continuing to develop in-house projects as well, to highlight new features and the general capabilities of what you can do with Netcode for GameObjects.
Our latest game is Galactic Kittens, a 2D, multiplayer, playable, open source, co-op shooter.
To start, check out these blog posts to learn about Unity’s multiplayer suite:
Plus some amazing resources created by our incredible community:
Visit our Productboard for full details on the roadmap. You’ll need to log in with your Unity ID and accept to use functional cookies. Each card on this interactive board is clickable, giving you more details about each topic while providing you with the option to share your feedback. Click on a card, select the level of importance of the topic to you, add your point of view, and submit. This feedback is then directly routed to the proper product teams.
Netcode for GameObjects is a capable netcode solution, but if you’re looking to build something much bigger – think galaxies or multi-server MMOs with thousands of players active at once – you’ll want to stay tuned for the release of our next blog in the Game Focus series, which will be all about how to create larger worlds and richer environments.