DOTS NetCode 0.4.0 released

We have released version 0.4.0 of DOTS NetCode.

The main changes apart from bugfixes are support for generating the serialization code for ICommandData and a change to how prefabs are generated which enables client and server in the same standalone build.

We are also deprecating ConvertToClientServerEntity in favor of sub-scenes, and removing fixed timestep on the client since there are no longer any known cases where it has a benefit over dynamic timestep.

Changelogs will be added to this message when they are published.

11 Likes

What has changed in the new Unity Transport 0.4.1 version?

1 Like

docs don’t seem to be up yet for netcode under the “latest” url and even when i explicitly type the version number for 0.4.0. This is also true for transport.

There’s a new utility method for checking the number of pending events in a NetworkDriver (NetworkDriver.GetEventQueueSizeForConnection), and a small compatibility fix for dots runtime.

not sure I understand what this means. If we have objects on client which are predicted and need to run on fixedUpdate, does that still work?

Or is it just msg sending/reception that now works on variable timestep?

Looks like a small update, I imagine you have worked on several other NetCode aspects.
Burst is still behind the verified version…

Are there any plans to release a version of Unity NetCode compatible with a standard project without the use of Entities? Because I imagine that Unity foresees a solution also for the projects without the DOTs, but the traditional use of GameObject and Momobehaviour?

I like DOTs, but when you’ve already coded thousands of lines of code, redoing everything in DOTs with incomplete physics isn’t really ideal.

Thank you for the feedback :wink:

6322161--700944--upload_2020-9-17_13-9-16.png

Thanks for the update!

Hm, that was already working for me. I’m a little confused what changed.

1 Like

Prediction still runs at a fixed timestep (with fractional ticks for interpolation). The change is that running the entire client update at a fixed rate with FixedClientTickRate no longer is possible. That will only affect client-only code which is not used for prediction. If you need client-only logic to run with a fixed timestep you can move it to FixedStepSimulationSystemGroup instead.

4 Likes

There are no plans to run DOTS NetCode without entities at the moment. It is still possible to run parts of the simulation in GameObject by copying data over or using hybrid components, but if you want to not use entities at all this is probably not the right solution at the moment.

The change was that it is now possible with sub-scenes and not just with runtime conversion.

2 Likes

"Stable, supported, and extensible netcode foundation for current Unity (GameObjects). " - Unity Blog “The road to 2021”

GOs might get some multiplayer love in 2021.

So I will be able to use Unity NetCode with my project. @timjohansson will this be some kind of Dots and non-Dots Hybrid? Or it will be an extension that does not use the Dots. I try to predict the shot during development, it’s a pretty big game, so I don’t want to miss my shot.

thanks

Be careful though. Implementing networking later in development very very often ends up in a catastrophe. Networking needs to be one of the very first things you implement in your game so that you can build all of your game systems on top of it and test them as you go, otherwise it’s going to be a nightmare. I would recommend sticking to whatever solutions are available right now (mirror, MLAPI, photon) for your current project, and then for your next project you could evaluate if you want to start it in DOTS and use NetCode

3 Likes

I also want to pipe in as a complete newcomer to netcode and say that the documentation “getting started” is now out of date.

Please, I would like to start on a small experimental project without a major part of the code under the threat of complete deprecation.

NetCode is still in preview, if you start now then there might be a risk of breaking changes, you either live with it or wait until it is out of preview I guess.

True. It’s been in preview for years now and I’m fairly decent with standard DOTS. Mainly just the jobs workflow, not entities.

I’ve been trying to test the waters with multiplayer in a new prototype but seeing how I cant even move past step 1 in the Getting Started without a deprecation message makes me very sad.

But as everything with Unity, I guess I’ll have to grit my teeth and go trial and error my way through. I guess the quality of documentation hasnt changed in the 4 month break. Such is life and Unity especially.

I know. I am not in my first multiplayer game. I want to use NetCode for its speed of execution with a “low latency”. And go there with a dedicated server on an expandable hosting cloud.

Currently we are focusing on assets, level design, navigation, connection, matchmaking etc, anything that does not require a networking system.

I would be curious to know a real equivalent to what NetCode promises in terms of Dedicated Server and communication below 100ms, for example 30ms like any good competition game.

Being able to develop the server and client side directly in Unity is very beneficial.

I would theoretically be ready to use Unity NetCode, but unfortunately at this stage it is not sufficiently advanced on the physics side with Dots.

The car driving system is far too advanced and uses current Unity physics. The Dots version lacks a bit of love …

We also use Houdini for a lot of Assets and this can cause problems when generating objects that use non-dots components.

If you have any advice on such a powerful alternative, I’d be curious to look.

thanks

Is there a recommended way to sync DynamicBuffers in ghosts?
Right now I’m converting buffers to bytes and sync them via FixedStrings which doesn’t feel right but it works as long as the size is not exceeded.

I thought about working around DynamicBuffers altogether, then I need to model them as seperate ghosts but I’m unsure if that’s good design and could lead to other problems.

2 Likes

I am pretty sure they are different teams and initiatives. They have been trying to hire a whole new big team to develop a new UNET for classic Unity with GameObjects. Separate from Unity DOTS NetCode.

1 Like

I’m having trouble making standalone builds from the latest samples out-of-the-box. What all is required? I know things just changed with standalone builds. I am getting this error:

Could not open file C:/projects/multiplayer/sampleproject/Builds/NetCubeServer/MultiplayerSample_Data/StreamingAssets/SubScenes/b3b4427e1963245ed97bcf69eaca92da.entityheader for read (Filename: C:\buildslave\unity\build\Runtime/File/OpenFileCache.cpp Line: 61)

There is no StreamingAssets folder being created for the build.

I have added both NetCube and the NetCubeClientServer to “Scenes in Build” and check-marked them. I have tried this with NetCube as well as Asteroids sample.