Search Unity

Accelerating Unity’s new GameObjects multiplayer networking framework

December 3, 2020 in Games | 4 min. read
Share

Is this article helpful for you?

Thank you for your feedback!

The open source MLAPI project joins the Unity family. Read on to discover some of the changes you can expect as we build Unity’s first-party GameObjects multiplayer networking (netcode) framework.

One of Unity’s top priorities for 2021 is to expand the Unity ecosystem with a first-party multiplayer networking solution for GameObjects that is easy to set up and extend, scales to meet the needs of high-performance titles, and is seamlessly integrated into the Unity ecosystem.

The existing UNet HLAPI architecture is not well suited for the in-depth evolution that is required to support games at scale. Rest assured, we don’t want to reinvent the wheel. The ecosystem currently offers multiple strong solutions, and the best path toward providing you with the scalable framework we envision is to build on the amazing work that already exists in the community. 

We considered various open source software (OSS) alternatives and found a framework that fit our needs. We’re thrilled to share that the OSS multiplayer networking framework MLAPI is joining the Unity family, along with its creator, Albin Corén.

As of today, we’re already working on integrating and evolving MLAPI into what will become Unity’s first-party GameObjects netcode solution. We plan to continue the development fully open source. Developing in the open and welcoming community contributions. If you are interested, you can join us on the GitHub MLAPI repo.

Here’s what you can expect in the short term:

  • Our brand-new team of solution architects have already joined the MLAPI Discord server and Unity Multiplayer forum to answer your questions and provide guidance when it comes to building multiplayer games.
  • Over the next few days, we will move the MLAPI repository into the Unity GitHub organization and start checking in new code. It will remain open source, preserving the full development history and all past releases, and all future development will take place in the open.
  • There will be no changes to the project license, it will continue to be an MIT license.
  • The codebase will evolve over the coming months. While we encourage you to evaluate MLAPI as it exists today, please keep in mind that to ensure future scalability and extensibility in the core systems we’ll need to introduce breaking changes. We will make them worthwhile, and we’ll be here to help you migrate.
  • We will continue to support an abstraction layer for many transports to interface with, and we are committed to maintaining the LLAPI and Unity Transport Package integrations with this mid-layer solution.

We have taken a deep look at MLAPI’s architecture, and we want to evolve a few key areas before we start building new features on top of this framework. Some areas of focus include:

  • Remote procedure calls (RPCs): Currently MLAPI has two RPC systems, “convenience RPCs” and “performance RPCs.” The convenience RPCs incur a performance overhead that performance RPCs address, but they are not straightforward to use. We are investigating options to replace both with a system that is performant, is easy to use, and has clean usage patterns.
  • Snapshot generation: MLAPI’s current design poses challenges for incorporating features like delta compression or client-side prediction. To overcome this roadblock, we’re working on separating snapshot generation from packet-sending systems.
  • Network relevance model: Sending the right data to each player enables developers to minimize their bandwidth costs and maximize players gameplay experiences. We'll change MLAPI so new methods can be used to increase performance, lower the likelihood of cheating, and lower operating costs by lowering the amount of data sent. 

On top of the architecture and feature work, we’re working on documentation, samples, how-tos, developer tools, and generally making it easier for every developer to build multiplayer games without having to become a multiplayer networking expert. 

As we mentioned above, this announcement is focused on developers working with a GameObjects pattern. For developers that are working with, or evaluating, the Entity Component System (ECS) pattern, either because of preference or because their title needs that level of hyper performance, the Unity NetCode package (Preview) continues to be Unity’s first-party framework for the scenario.

Our goal remains to set creators up for success by providing the technology that enables them to bring players together at scale. 

We’ll share more soon on this blog. Stay tuned, check out the GitHub project and let us know if you have questions on the MLAPI Discord channel.

December 3, 2020 in Games | 4 min. read

Is this article helpful for you?

Thank you for your feedback!