DEV Community

Winteraio
Winteraio

Posted on

System's Dependency on Entity Component System

Hello, I'm Junior Game Engine dev.

In few days, I have studied ECS, and I tried to set up for my project.

But, I wondered how to manage system on ECS.

A few systems need dependency, like RenderSystem must run after MoveSystem.

Then, On ECS, the Systems have specific sequence?? or just set up dependency systems?

I Simply thought, just make linked list that connect Systemslike, using System's Interface pointer.

But, It's expected to be complex and difficult on bigger project.

And, linked list cannot use parrellel method for multiple systems.

Cause, just run single systems step by step.

Finally, I thougth, just use Directed Acyclic Graph

that look like the system's attributes are Sequencial and Dependencial.

ISystem - System's Interface, all of system inheritance this object.

Linked List

Just Connect Prev ISystem's Pointer with Next ISystem's Pointer

Vector

Register System the last index, and access using index

Graph - Directed Acyclic Graph

Just Register dependencial System on other System.

run by dependencial distance which is zero or smaller

Then, What do you think about managing Systems on ECS??

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More