Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [entity-component-system]

Used when referring to the Entity-Component-System (ECS) architecture.

Filter by
Sorted by
Tagged with
4 votes
1 answer
3k views

Dealing with more complex entities in an ECS architecture

Preamble: I'm working on a level editor for my engine, which uses an ECS architecture. I have around a dozen component types so far, mostly dealing with graphics, like lighting components, model, and ...
Yattabyte's user avatar
  • 1,023
8 votes
4 answers
6k views

What is a pure ECS?

What is a "pure" ECS? What makes an ECS pure or not? Although the term appears to have come up since as early as 2013 in this community, it appears that often, a user asking a question feels the need ...
Vaillancourt's user avatar
  • 16.3k
3 votes
1 answer
3k views

Should components in Entity Component System pattern have logic?

Is often read that in entity component system pattern we should treat components just as a passive data structure with no logic at all, this way we follow to a data oriented design approach with ...
Alejandro's user avatar
56 votes
3 answers
18k views

In an Entity-Component-System Engine, How do I deal with groups of dependent entities?

After going over a few game design patterns, I have settle with Entity-Component-System (ES System) for my game engine. I've reading articles (mainly T=Machine) and review some source code and I ...
John Daniels's user avatar
6 votes
2 answers
6k views

Fastest way to look up an entity with a set of components?

I'm currently trying to implement an ECS system, but I've sort of ran into a problem trying to fetch all of my entities that have a specific set of components. I currently have a Dictionary that maps ...
jj232's user avatar
  • 63
4 votes
2 answers
1k views

How to implement n-body in an Entity Component System

Recently I've been throwing problems at Entity Component Systems to see how far I can push the paradigm. One problem in particular I struggle with, which is writing an elegant implementation of the n-...
Sander Mertens's user avatar
3 votes
1 answer
5k views

Handling input in a custom ECS engine

I've been implementing an Entity Component System into my custom toy engine so I can learn more about it. Currently I have the following problem: I can't think of a way of implementing input as a ...
Sergio Dorado's user avatar
3 votes
1 answer
3k views

Question on parallelizing ECS Systems

Learning & Implementing an ECS system for my game, I'm wondering how I am supposed to parallelize the systems on multiple threads. Different systems can't run at the same time (unless they operate ...
yggdrasil's user avatar
  • 131
3 votes
1 answer
3k views

How to do State-Based Animation with ECS

I'm making a simple platformer game and was suggested to use ECS from a friend. It looked pretty interested and at least worth a try, so I did. I got ECS working and started work on the rendering ...
William Thompson's user avatar
2 votes
2 answers
3k views

How to Implement ECS Archetypes in C#?

I'm trying to figure out how to implement a simple ECS with an Archetype approach, similar to what Unity's ECS uses. An archetype is just a category for entities that have a specific set of components....
Floating Sunfish's user avatar
2 votes
1 answer
2k views

What should be an entity/component, and what shouldn't?

I've recently been reading the book Game Programming Patterns by Bob Nystrom, and one chapter I've found a bit hard to grip is the chapter about the Component pattern. In the example he uses (which ...
JensB's user avatar
  • 157
1 vote
1 answer
492 views

Branchless archetype ECS?

I lately read an article about branchless programming and how it can effect performance. Since im developing a little archetype based ECS for learning purposes, i wanted to know if theres a way to ...
genaray's user avatar
  • 517
1 vote
2 answers
1k views

How do the systems find the entities they should operate on in Entity-Component-System pattern?

I have read many articles about ECS patterns. Many of them are clear on what the entity and components are but don't really talk about the system because it "varies" or just use plain English to ...
Jiehong Jiang's user avatar
0 votes
1 answer
459 views

Reading and writing components from multiple systems in ECS [duplicate]

As a learning exercise, I'm building my own ECS. I've got a situation where two separate systems want to query and possibly update a Transform component - input ...
junglie85's user avatar
  • 123