What's new for multiplayer networking in Unity | Unity Blog
source link: https://blog.unity.com/games/feature-preview-whats-new-for-multiplayer-networking-in-unity
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Multiplayer gaming is becoming ever more popular and vital for success in our industry, so that is why we are working to create a robust and extensible network solution to help your projects reach their potential.
We’re happy to share that, as of October 21st, Unity creators have an expanded and supported feature set that accelerates the creation of small-scale cooperative games (like Animal Crossing). These new pre-release packages are now available and are compatible with Unity 2020.3 LTS, Unity 2021.2, and Unity 2022.1 beta. In addition to that, we’ve introduced two new Unity Gaming Services, Relay and Lobby, to keep your players connected for great multiplayer experiences.
Let’s dive into the latest update.
Here are the new additions to our Unity first-party netcode solution, including:
- The official 1.0.0-pre release of Netcode for GameObjects with an extended feature set focused on moderate-pace, small-scale, cooperative games
- Enhancements to the Unity Transport, including added support for DTLS encryption
- A new Network Profiler
- New multiplayer services, Relay and Lobby
- Updates to our sample game, Boss Room
Now, as we continue to validate and polish this release, we are going to focus on:
- Building the foundation that will allow creators to rely on Unity for competitive games
- Increasing iteration and accessibility via improved multiplayer development workflow
- Continuing to improve our server performance and the integration with our Unity Gaming Services platform
Here’s what’s new in this Oct 21st release and how each solution can be used to facilitate multiplayer game creation.
Netcode for GameObjects 1.0.0-pre
The Netcode for GameObjects 1.0.0-pre release has an extended feature set that enables customers to accelerate the development of small-scale cooperative games. Eager and savvy developers may choose to leverage the MIT-licensed and freely available source code to extend or modify the provided components to their needs.
Here’s what we’ve worked on for this prerelease:
- Streamlined RPC layer with support for serialization of custom data types
- Improved scene management which includes additive scene workflows support
- Support for network animations
- Improved network transforms with interpolation support
- Network object parenting support
We will continue working to strengthen our offering and support for the construction and operation of small-scale, cooperative games in future releases. We will also be expanding our focus to include support for larger scale, lower-latency, competitive type games in the future.
Install Netcode for GameObjects here
Unity Transport UTP 1.0.0-pre
Unity Transport is a gaming-specific wrapper around UDP that works both for DOTS and GameObjects netcode. Among other improvements, this pre-release includes support for DTLS and the Unity Relay protocol – which enables creators to communicate with our new Relay service.
Installation instructions for Unity Transport can be found here.
Unity Transport Adapter for GameObjects 1.0.0-pre
The Unity Transport Adapter is a required package for having Netcode for GameObjects work with the Unity Transport.
Network profiler
The new network profiler allows users to inspect detailed information about the network activity from Netcode for GameObjects. Now you can analyze both incoming and outgoing message-related activity.
When Netcode for GameObjects is installed and the multiplayer tools package is added, the new network profiler module can be found inside the Unity Profiler.
Relay (beta)
Relay allows players to connect and enjoy immersive multiplayer gaming experiences – all without needing a dedicated game server. The Relay service also leverages Unity Transport, enabling easy and secure peer-to-peer communication between players.
Lobby (beta)
Lobby allows your players to connect before or during a game session. Players create public lobbies using simple game attributes which other players can then search, discover, and join. Invite-only lobbies also allow players to create private spaces for select participants only.
Boss Room
The Boss Room RPG co-op sample is built to show developers the fundamental flow of multiplayer game development and is now in prerelease. Boss Room features eight playable characters in four unique classes, enemies, and a boss with unique abilities. Assets and code are available so anyone can learn more about networking a multiplayer game. This update also features support for the new Unity Relay.
Join the conversation! We have a live documentation site, an active netcode community on Discord, and a new Multiplayer forum! Plus, check out the roadmap to give feedback on our planned features or add a request for a feature you don’t see in our plan.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK