Why Is There No MMO Sample in NetCode for Entities?

Hi, :wave:

First of all, I appreciate all the great tools and samples provided for NetCode for Entities so far. They’ve been incredibly helpful in understanding how to build multiplayer games using Unity’s DOTS ecosystem.

However, I noticed that while there are samples for smaller-scale multiplayer games like FPS and co-op scenarios, there isn’t a sample that demonstrates how to implement an MMO-like architecture. MMOs have unique challenges, such as large-scale world management, thousands of simultaneous players, and complex systems like persistence, dynamic zones, and seamless player interactions.

Are there any plans to release an MMO sample for NetCode for Entities? Or are there any resources or best practices for those of us looking to tackle large-scale multiplayer games with Unity’s DOTS?

Just wanted to learn more and get some insights from the community! :blush:

Thanks in advance!

1 Like

I feel like you’ve kind of answered the question yourself.

MMOs often require a very custom network implementation tailored specifically to the solution.

2 Likes

With the 2D MMO I have been playing with over the last 4 years I wrote the network layer using LiteLib. Gives me complete control and probably the best way to get higher player count. I even took it a step further and wrote the server portion without Unity.

1 Like

Thanks for the response! I completely understand that MMOs usually require custom network implementations due to their scale and unique requirements. However, I was hoping to get a bit more clarity or direction.

For example:

  1. Are there any existing components within NetCode for Entities that could be leveraged as a starting point for MMO features?
  2. Have others in the community attempted to build MMO-like systems using DOTS? If so, are there any learnings or pitfalls they’ve shared?
  3. Would Unity’s roadmap for NetCode for Entities include features or tools that might make large-scale multiplayer games more feasible?

I understand that building an MMO is a massive undertaking, but guidance on best practices or even high-level architectural suggestions for using DOTS in this context would be incredibly valuable.

Thanks again for the input, and I’d love to hear from others who might have explored similar projects, as well as any insights or guidance from the Unity team!

1 Like

Thanks for sharing your experience! That sounds like an impressive setup, especially taking the server portion completely out of Unity.

I’m curious:

  1. What motivated you to use LiteLib for your network layer? Did you evaluate other libraries like Mirror, or Photon before deciding?
  2. How do you handle challenges like synchronization, or persistence in your setup?

Your experience sounds like a great example of the kind of flexibility MMOs require. I’d love to learn more about how you approached these challenges!"

We don’t use Netcode but we use transport and it seems to scale to 500+ players reasonably well.

1 Like

You are figuratively asking for guidance on how to construct a 40-ton truck from the ground up with just the drivewheel available to you.

It’s one of those things where, if you have to ask that question, you’re way out of your league. And those who could implement that sort of thing don’t need this kind of guidance because they will create lots of tech samples and experiment with every nook and cranny anyway. :wink:

Thus you will hardly find anything about MMO tech details from anyone besides high-level postmortems. Because on the one hand, hardly anyone is going to peruse that information and on the other, these are well kept technological secrets.

2 Likes

Thanks for the feedback. I completely understand that MMO tech is often considered proprietary or confidential, and high-level postmortems are some of the few places where people share bits of information. I also recognize that building such systems is a huge task, which is why I’m starting small and gradually learning how to implement scalable multiplayer features.

That being said, I’m not expecting a full, detailed blueprint but rather looking for advice on how to approach the initial steps, tackle the basics, and eventually scale things up.

Best advice: start small, scale up by small factors, and then profile and optimize. You will be rewriting a lot of systems so a high level of modularity is recommended. You also need to optimize for money, aka CPU time and traffic, not just performance.

Other than that, the only resource a solo dev really doesn‘t have to create a scalable MMO with high player counts is time because this could take a decade or more, even centuries, depending on the final goal.

2 Likes

Hey,
You can check out my thread here about the process if you like:

https://discussions.unity.com/t/creating-an-isometric-2d-rpg-mmo-ongoing-series/

TLDR: I evaluated a few different solutions and for my main objective of an authoritative server with the foresight of high player count a low level library and writing my own network code seems likely to have the best success.

Current I don’t persistence (saving gamestate) but it’s on the roadmap, currently I just load all the world data from JSON files and everything resets every time i start the server. This make it really easy to setup and test mechanic’s of the game.

2 Likes