1. 10
  1. 2

    Having used ECS in a large C++ project before, I quite like it. It helps you to organize things easier in your head in my opinion. Other architecture’s seem to be based on some real world hierarchy that’s heterogeneous, so you have to switch your mental model for different parts of the system. ECS being so simple can represent nearly anything you throw at it, so it’s easy to make a conceptually consistent design with it IMO.

    1. 1

      Majority of C++ projects I worked on decomposed to a small collection of fairly simple services and a bus enabling communication between them. As much as I like ECS, these services wouldn’t be a natural fit for it. If we went with a single, big service, then yes. But I feel like a lot of systems benefit from bus + clients architecture (at the very least all of the embedded systems I worked on). ECS is great for things that smell like simulation but not that many do.

      1. 1

        That architecture does sound good for embedded systems. The project I worked on used ECS for the core of a secure communications app. I could see the client and bus pattern you describe working there too. In my mind both are pretty similar. The abstraction of a service, is similar to a component (at least how we used it), and the “bus” part was all the code we wrote to get from one component to another through the entity.

        Another interesting architecture you may like is the actor system. However, I’ve only used it in Java with Akka. I believe there is one good library for using it in C++, but I’ve forgotten the name.