An engine question: Entity Component System (ECS)

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Post Reply
jojorne
Posts: 815
Joined: Sun, 17. Nov 13, 17:25
x4

An engine question: Entity Component System (ECS)

Post by jojorne » Sat, 16. Oct 21, 15:55

Do you guys think that the X Series would have a great benefit if it used Entity Component System (ECS)? And here's an example of a system. I believe that it not only would bring a great performance enhancement but also it would simplify all the components of the simulator engine which would result in less bugs.
Last edited by jojorne on Sat, 16. Oct 21, 16:08, edited 1 time in total.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: An engine question: Entity Component System (ECS)

Post by Imperial Good » Sat, 16. Oct 21, 16:00

To me it looks like they already are using an entity component system in some form or another.

jojorne
Posts: 815
Joined: Sun, 17. Nov 13, 17:25
x4

Re: An engine question: Entity Component System (ECS)

Post by jojorne » Sat, 16. Oct 21, 16:40

Imperial Good wrote:
Sat, 16. Oct 21, 16:00
To me it looks like they already are using an entity component system in some form or another.
Isn't it an Event-Driven Architecture (EDA)? It has handlers, actions, even an AI director. It's common in 4X genres.

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4750
Joined: Fri, 21. Dec 18, 18:23
x4

Re: An engine question: Entity Component System (ECS)

Post by Imperial Good » Sun, 17. Oct 21, 16:57

jojorne wrote:
Sat, 16. Oct 21, 16:40
Isn't it an Event-Driven Architecture (EDA)? It has handlers, actions, even an AI director. It's common in 4X genres.
That article seems to have little to do with game engine design and is a game play design concept?

The AI director and such event driven systems are likely implemented as a system in an entity component system. The actual game state seems to be handled by entities with unique IDs which have components assigned to them used by systems. For example the research system modifies a component of the player's HQ to store the state of technologies that have been unlocked. Also if you look at how the game data is stored it is fully data driven, using XML, and even refers to "component" when describing the data.

Post Reply

Return to “X4: Foundations”