Skip to main content

Questions tagged [entity-component-system]

The entity-component-system is an architectural pattern that uses very few and simple entity classes whose instances are dynamically composed of components that provide structural and behavioral features.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
110 views

How are ECS and DoD combined?

Where is this array of components over whitch queries are done to run through systems? How do the components get into those arrays? How does the query system work? Does this combined system even have ...
Marko Taht's user avatar
0 votes
0 answers
95 views

How can I better design systems and components in ECS?

I'm working on a game from scratch in C++ which is based on an Entity Component System and I've ran into a bit of a problem with the way I've been designing my systems and components. I find myself ...
Konjointed's user avatar
1 vote
1 answer
133 views

What is a common practice to refer to other datas within a data oriented design?

This question has been in my mind for a while now, especially in the context of high performance, interactive 3d applications. Just want to find out what is the general practices in DoD for ...
Gasim's user avatar
  • 179
2 votes
1 answer
687 views

What would the database schema look like for a Entity Component System architecture of web app?

I found previous SE questions like this. I'm familiar with the typical RDBMS backed MVC web app framework. To illustrate what I am thinking of, let's use the examples of Bunny and Carrot from this [...
Kim Stacks's user avatar
2 votes
1 answer
419 views

Rust/specs – what is the good/idiomatic way of design level walls/static objects handling in an ECS architecture

Warning: long question ahead, don't be afraid, I just tried to be as precise as possible about details for who wants them but many paragraphs are skipables if you already understood what I want ;). ...
jthulhu's user avatar
  • 141
1 vote
1 answer
492 views

How to model interaction between entities in ECS?

I am exploring the ECS pattern and my pet project is a simulation of an economy where the primary mode of interaction between economic agents is a transaction. Some of these agents are market makers (...
Chechy Levas's user avatar
1 vote
1 answer
164 views

Writing a data-oriented ECS update loop that handles multiple components

So I have an engine in progress that's structured like this: entities are simple ids (unsigned short) components are stored in pools which are static members systems are stored by the manager, and ...
leonardo vegetti's user avatar
1 vote
1 answer
989 views

Designing an Entity Component System for interfacing with a scripting language

I am currently building an Entity Component System (ECS) in cython in order to speed up operating on large numbers of game objects in python. In the process of building this system, I ran into the ...
CodeSurgeon's user avatar
3 votes
1 answer
362 views

different collision geometries in a component based game engine

I'm writing a simple game engine and after a lot of rethinking/refactoring I settled with sort of a component based architecture (not strictly ECS, but it isn't inheritance based anymore either). So ...
Luca's user avatar
  • 181
0 votes
2 answers
1k views

How do you actually access the data of individual components in an Entity-Component-System design? (C++)

I've been scouring information on Entity-Component-System designs for weeks to try to figure out how to implement it in C++, and there are lots of wonderful explanations for different aspects of it, ...
Jarius's user avatar
  • 3
1 vote
2 answers
4k views

Difference between MVC and ECS

Following reading Thomas Owens response (many thanks to him) on Is it reasonable to build applications (not games) using a component-entity-system architecture? and his explanation on what is ECS ...
Ambroise Rabier's user avatar
14 votes
2 answers
12k views

Isn't an Entity-Component System terrible for decoupling/information hiding?

The title is intentionally hyperbolic and it may just be my inexperience with the pattern but here's my reasoning: The "usual" or arguably straightforward way of implementing entities is by ...
PawkyPenguin's user avatar
5 votes
5 answers
293 views

How does one resolve low level types dependent on high level types?

I frequently come across this problem when developing games and simulations. As an example, I'm currently writing an implementation of chess. I'm using it as a vehicle to experiment with entity-...
Jansky's user avatar
  • 181
12 votes
1 answer
8k views

OOP ECS vs Pure ECS

Firstly, I am aware that this question links with the topic of game development but I have decided to ask it here since it really comes down to a more general software engeneering problem. During the ...
Adrian Albert Koch's user avatar
-1 votes
2 answers
4k views

C#, Static classes and Inheritance

As a beginner I'll try to explain my problem as good as I can: I'm currently trying to program a "simple" ECS. My basic idea is that I have a base "Entity class" which includes all sorts of functions ...
Maxracer's user avatar
5 votes
2 answers
2k views

A more data oriented design approach to Entity Component System

I'm creating my first c++ game engine project (for learning purposes) and in it I've attempted to implement an entity/component system utilizing some data oriented design principles while also not ...
Jason's user avatar
  • 469
5 votes
2 answers
1k views

How to allow for custom Rules in a Entity Component System designed game engine?

So I've been doing a lot of research into game engines, and Entity Component System (ECS) seems to be the most flexible and extendable design to use. Just to summarize, in ECS the basic idea is that ...
Robert Jefferies's user avatar
6 votes
2 answers
1k views

Bottleneck performance in ECS

I've been looking into building an entity-component-system. Basically, an entity is just an id wrapped around a struct, components are data belonging to that entity(and reference said id), and systems ...
Daniel Martin's user avatar
1 vote
0 answers
394 views

Generalization of phase based systems for card and board games

In an exercise of futility I'm trying to abstract and generalize a framework where to build any turn/rule based system. I've had a head start but after decompiling HearthStone I'm second-guessing that ...
MLProgrammer-CiM's user avatar
3 votes
2 answers
2k views

Entity Component System Coupling

Lately I've been working on a small personal project which is basically an Entity Component System framework with autoupdated Systems. While I have a pretty good idea on the way the framework should ...
Veritas's user avatar
  • 131
1 vote
1 answer
746 views

Implementing state-driven agents within an Entity-Component-System approach

A state-driven agent is an agent that performs an action based on its current state. The logic can be implemented through the use of a D-FSM that changes state depending on the Agent's "perception" ...
lds's user avatar
  • 11
21 votes
5 answers
25k views

Is the Entity Component System architecture object oriented by definition?

Is the Entity Component System architecture object oriented, by definition? It seems more procedural or functional to me. My opinion is that it doesn't prevent you from implementing it in an OO ...
Daniel Kaplan's user avatar
27 votes
4 answers
14k views

How to avoid "managers" in my code

I'm currently re-designing my Entity System, for C++, and I have a lot of Managers. In my design, I have these classes, in order to tie my library together. I've heard a lot of bad things when it ...
miguel.martin's user avatar
16 votes
3 answers
9k views

Entity-Component-System architecture: interaction between systems

I am studying the Entity-Component-System architecture philosophy. As I have read about it, a typical entity system has: 1) Entities - which are merely ID tags which have a number of components 2) ...
noncom's user avatar
  • 293