3 ms·
Something I don't get about ECS: How do you handle interactions between systems, and especially side effects that can affect multiple systems? Because of those
by cloogshicer 4y ago
Something I don't get about ECS: How do you handle interactions between systems, and especially side effects that can affect multiple systems?
Because of those, the systems can't really be considered truly independent, can they?
Doesn't this cause complexity to go through the roof?
- kvark 4y agoIn some ECS in Rust (like Specs) there is a concept of a “resource” for this. System declare their use of resources, which allows the scheduler to order them.
- deleted 4y ago[deleted]
- Hemospectrum 4y agoSystems communicate via components. They can create empty "marker" components (and remove them again as needed) or, when applicable, put data in shared singleton data structures called "resources."
- linkdd 4y agoI like to have a message bus to send messages to queues and have systems consuming those queues. The shared mutable reference to this message bus would be provided to each system requiring it. It's easily achievable in Rust with Bevy, or with Unity DOTS. When I don't use Unity DOTS and simply good old MonoBehaviours, I call the message handlers as soon as the message is published instead.