#DOTS or an ECS Library

1 messages · Page 1 of 1 (latest)

sleek gyro
#

Looking to do a large scale simulation of a world, with lots of agents roaming around and making choices. Think Crusader Kings or Bannerlord, but with a bigger emphasis on scale and less on pesky things like looking good. The world is tile based, and the game is entirely 2D. The simulation is fully tick based, meaning no matter the framerate events will play out the same in an exact order.

Performance is important in this project. The more optimized the simulation is, the larger scale it can be. Before I start diving into a learning spree, I'm curious if those familiar with the DOD paradigm would recommend using Unity's DOTS or an external ECS library like Arch and just using Unity for rendering.

The reason I'm considering an outside library is because DOTS comes with a lot of bells and whistles that I don't really need. I won't have physics, collisions, or 3D models, and the thousands of active agents won't all be visible at once, nor will there be animations outside of sprite sheets and basic transforms like rotation, scale, and translation of the entire sprite. It's mainly just math which will determine outcomes and pathfinding. However, even with a lightweight ECS library I'd likely have some overhead from rendering I wouldn't have with DOTS since it's designed with rendering in mind.

Anyone with experience got advice?

lethal arch
#

I don't quite understand "The reason I'm considering an outside library is because DOTS comes with a lot of bells and whistles that I don't really need".

Why can't you just install the Entities package (which is just the core ECS), and don't install Entities Graphics and Unity Phyiscs, then?

sleek gyro
#

That's a fair point. I guess the other reason is the learning curve. Easier to learn a lightweight library that focuses on one thing than the DOTS ecosystem. But that's more a skill issue on my part.

lethal arch
#

BTW you should check this page to clarify the packge roles.

lethal arch
# sleek gyro That's a fair point. I guess the other reason is the learning curve. Easier to l...

Yep, but that's 'on you' 🙂 Regardless of the tool choice, we have to learn. We're all in the same boat.

Like you said, other packages are an option. Personally I like Flecs, which has unofficial C# bindings. There are lots of other C# ECS libraries, such as Friflo. But I think the only way to make that choice is for you to pick 2-3 in addition to DOTS and build the same simple prototype with each.

#

You also captured one of the major points correctly, which is the integration. The integration you'd get with the DOTS stack is a major factor in its favour.

#

Even if not today, maybe you'll want to add e.g. multiplayer later, or physics. Then you can just pull one of these packages 'off the shelf' and know that it's going to integrate with Entities.

sleek gyro
#

Yeah, you make a lot of good points. I think the learning curve of DOTS will be steeper, but probably more fruitful.

I think my other fear is that DOTS is still in pretty active development, and may be changing drastically over the next few years.

lethal arch
#

Yep it's going to change, but so will all the other libraries (unless they are no longer actively developed, which wouldn't be a good sign anyway)
But we're in version 1.0 of Entities now, so the changes should be slower going forward.

The way you handle this is stick to a major version of Unity and the relevant packages throughout the development of your project.

sleek gyro
#

B-but shiny new features! 😂 Yeah you're right. I already knew that, but it's hard to silence that voice.

#

The temptation...

proven ore
#

First you have to learn the ECS mindset, then you have to learn the library API. Any library comes with its own flavour of API.

#

I think my other fear is that DOTS is still in pretty active development, and may be changing drastically over the next few years.
Unity is integrating DOTS deeper into the engine so yes some major changes will happen in the near future. But not that drastic, if you mean it like something sudden. They'll announce before-hand so we'll have time to adjust. Personally I think DOTS foundation is fairly solid now, you can depend on it for some years until you're willing to update for new changes.