700 concurrent users in MMO-style tech demo with Netcode for Entities

During my bachelor thesis at CipSoft, an independent developer and operator of online games from Germany, my task was to evaluate Netcode for Entities and its usability for massively multiplayer online games. After thoroughly testing Megacity Metro (results in Megacity Metro Demo Now Available ) I made my own Unity project from the ground up. Here is a short video about that project:

The project was used to conduct load tests trying to evaluate the maximum amount of connected clients (“concurrent users”). Running on off-the-shelf hardware, the game server was able to host 700+ concurrent users at 30 updates per second by the game server without visible stuttering. With higher amounts, for example with 1000+ concurrent users, the network traffic became the bottleneck, resulting in visible stuttering of the avatars. This was fully expected because synchronizing player avatars simply results in a square-growing amount of network traffic, hitting a physical limit at some point. Bottlenecks for CPU, GPU or RAM did not appear in the conducted load tests.

We made the project open source to enable others to try things out for themselves: GitHub - CipSoft/IncubationEvaluationNetcodeForEntities2024: CipSoft's evaluation of Unity's Netcode for Entities in June 2024

During our evaluation, Netcode for Entities did run stable and fast and supported several hundred concurrent users. It appears to be possible to build massively multiplayer online games with it. On the other hand, its documentation is below our expectations. Especially, such a remarkable feature like ThinClients is not really documented at all.

Unity’s Entity Component System (ECS) adds both performance and complexity to a project. One must make an informed decision whether that is a good deal for the own project. On the other hand, its documentation also is below our expectations. In addition, ECS in its current state in June 2024 does lack basic features compared to GameObjects, for example animation, sound or user interface. This lack requires hybrid solutions, adding even more complexity and reducing performance benefits.

Among the programmers at CipSoft it is the opinion that ECS currently is not ready to be used, but with the right improvements this might (and hopefully does) change in the future.

10 Likes

Hey @bfelixx cool demo. Did you also take a look at the NetcodeSamples ? https://github.com/Unity-Technologies/EntityComponentSystemSamples/blob/master/NetcodeSamples/Assets/README.md They are a great resource in addition to doc.

For hardware, I’m curious, what’s “off the shelf” here? PC at your office? Some cloud instance? What kind of configuration, network card, CPU, memory, etc?

Small note (it shouldn’t contribute to your bandwidth consumption too much since it’d delta compressed, but still) you’re updating Nickname every single tick with a RW access. This marks it as dirty Netcode side every tick, which means its serialization code needs to spend time on it when it shouldn’t have to. Not a big deal since you’re saying you’re bandwidth bound. But good thing to keep in mind.

1 Like

Hi @SamuelBellomoUnity thanks for the detailed feedback!

I actually looked into the samples for some inspiration and learning. My problem with them is that they lack detailed documentation, they are put into the ECS Samples Repo (IMO Netcode is big enough to get its own repo for better navigation) and they use outdated ECS and Netcode versions (1.0.10) which is unfortunate :confused:

About the hardware, we used a PC in our office. The one we used has these specs:

  • Intel Xeon E-2146G CPU @ 3.50GHz (6 cores, 12 threads)
  • 32 GB RAM
  • NVIDIA GeForce GTX 1650 (4 GB)
  • Intel Ethernet Connection I219-LM (1000 Mbps)

The game clients ran on two other PCs (wired) and five office laptops (wireless).
The stuttering appeared when the game server wasn’t able to send all its network traffic to the game clients anymore, probably to the laptops over wireless connections.

And good find of you with the nicknames! You are totally right, this is not how it should be done :smile:. Thanks for the heads-up!

@felixx_be for me, this article helped to improve the traffic problem: Optimizations | Netcode for Entities | 1.2.3 (unity3d.com). Stuttering became less noticeable by about 2-3 times.