Search Unity

Announcing UNET – new multiplayer technology

May 12, 2014 in Engine & platform | 6 min. read
Placeholder image Unity 2
Placeholder image Unity 2
Share

Is this article helpful for you?

Thank you for your feedback!

A few weeks ago, at our Unite Asia conferences, we announced that we are developing new multiplayer tools, technologies and services for Unity developers. The internal project name for this is UNET which simply stands for Unity Networking. But our vision goes well beyond simple networking. As you all know, the Unity vision is to Democratize Game Development. The Unity Networking team wants to specifically Democratize Multiplayer Game Development. We want all game developers to be able to build multiplayer games for any type of game with any number of players.

Before joining Unity, members of the networking team worked mainly on MMOs such as Ultima Online, Lord of the Rings Online, Dungeons and Dragons Online, Marvel Heroes, Need for Speed Online and World of Warcraft. We have a lot of passion for and a ton of experience with making multiplayer games, technology and infrastructure. The Unity vision was known to each of us and was always very appealing. When the chance to do something truly great like specializing the Unity vision with multiplayer came up, it was impossible to decline.  So we all left our former jobs and joined Unity to make this vision happen. Right now, we’re working hard to deliver these tools, technology and services so anyone can make their own dreams of a multiplayer game a reality.

This is of course a pretty big undertaking, but, like I said, we have all done this before, and we are all very driven to do it again (because it’s really, really cool!). The way we have tackled this is to divide our overall goal into phases which should be familiar to Unity developers. We take the approach of releasing a Phase 1, getting feedback from our users, adding that feedback to our work to make the next phase even better and repeating that cycle.

For UNET, Phase 1 is what we call the Multiplayer Foundation - more on that in a bit. Phase 2 is where we build on Phase 1 to introduce server authoritative gaming with what we call the Simulation Server, we’ll blog about this later. Finally, Phase 3 is where we want to introduce the ability to coordinate multiple Simulation Servers through a Master Simulation Server. As usual, exact dates for this are not possible and of course things can change, especially after gathering feedback from our users. But we can say that Phase 1 will be part of the 5.x release cycle and Phase 2 is in R&D right now.

So what do we mean by the Multiplayer Foundation for Phase 1? The main features are as follows:

  • High performance transport layer based on UDP to support all game types

  • Low Level API (LLAPI) provides complete control through a socket like interface

  • High Level API (HLAPI) provides simple and secure client/server network model

  • Matchmaker Service provides basic functionality for creating rooms and helping players find others to play with

  • Relay Server solves connectivity problems for players trying to connect to each other behind firewalls

We had some inherent limitations with our legacy system that we needed to address and with our greater goal in mind it became clear that we needed to start from scratch. Since our goal is to support all game types and any number of connections, we started with a new high performance transport layer based on UDP. While it’s true that a lot of games are done quite well with TCP, fast action games will need to use UDP as TCP holds the most recently received packets if they arrive out of order.

From this new transport layer we built two new APIs. We have a new High Level API (HLAPI) which introduces a simple and secure client/server networking model. If you’re not a network engineer and you want to easily make a multiplayer game, the HLAPI will interest you.

We also wanted to address feedback we’d received on our old system: some users needed to have a lower level access for greater control. So we also have the Low Level API (LLAPI) which provides a more socket-like interface to the transport layer. If you are a network engineer and want to define a custom network model or just fine tune your network performance, then the LLAPI will interest you.

The Matchmaker service is used to configure rooms for your multiplayer game and get your players to find each other. And finally the Relay Server makes sure your players can always connect to each other.

We know from our prior experiences that making multiplayer games involves a lot of pain.  So the Multiplayer Foundation is a new set of easy to use professional networking technology, tools and infrastructure for making multiplayer games without this pain. To even get started, I think it is fair to say that making a multiplayer game requires a fair bit of knowledge of networking and protocols. You either overcome the painfully steep learning curve yourself or find a network engineer to join you.  Once you’ve gotten past that, you then have to solve the problem of getting your players to find each other.  And once you’ve solved that problem, you now have to deal with getting players to be able to actually connect with each other, which can be troublesome when they are behind firewalls with NAT.  But then if you’ve solved all of that you’ve created a bunch of associated infrastructure which wasn’t game development and probably wasn’t fun. And now you have to worry about dynamically scaling your infrastructure which usually takes a bit of prior experience to get right.

Our Phase 1 addresses each of these pain points. The HLAPI eliminates the need for a deep knowledge of networking. But the LLAPI is there if you are a network engineer and you want to do things your own way. The Matchmaker solves your problem of getting your players to find each other. The Relay Server solves your problem of getting players to be able to connect to each other. And we also solved your problem of the associated infrastructure and dynamically scaling it. The Matchmaker and Relay Server live in Unity’s Multiplayer Cloud. So not only do the physical servers scale up and down based on demand, but the processes scale up and down as well.

We are very excited about UNET and are eager to share more details. Over the next few weeks we’ll follow up with more blogs from the rest of the team.  We would love to hear what you think, and we can’t wait to see what you all make with this in the future.

May 12, 2014 in Engine & platform | 6 min. read

Is this article helpful for you?

Thank you for your feedback!