A programming paradigm in which gameobjects (entities) are composed out of components, and are operated upon by systems. Each entity is an ID that points to specific components.

learn more… | top users | synonyms

96
votes
1answer
15k views

Role of systems in entity systems architecture

I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the ...
89
votes
9answers
10k views

Entity communication: Message queue vs Publish/Subscribe vs Signal/Slots

How do game engine entities communicate? Two use cases: How would entity_A send a take-damage message to entity_B? How would entity_A query entity_B's HP? Here's what I've encountered so far: ...
21
votes
3answers
5k views

How to properly implement message handling in a component based entity system?

I am implementing an entity system variant that has: An Entity class that is little more than an ID that binds components together A bunch of component classes that have no "component logic", only ...
49
votes
1answer
9k views

Using component based entity system practically

Yesterday, I've read a presentation from GDC Canada about Attribute / Behaviour entity system and I think it's pretty great. However, I'm not sure how to use it practially, not just in theory. First ...
20
votes
5answers
5k views

Implementing features in an Entity System

After asking two questions on Entity Systems (1, 2), and reading some articles on them, I think that I understand them much better than before. But, I still have some uncertainties, and mainly they ...
21
votes
6answers
5k views

What designs are there for a component based entity system that are user friendly but still flexible?

I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
10
votes
3answers
2k views

Why is it a bad idea to store methods in Entities and Components? (Along with some other Entity System questions.)

This is a followup to this question, which I answered, but this one tackles with a much more specific subject. This answer helped me understand Entity Systems even better than the article. I've ...
31
votes
2answers
9k views

Entity/Component Systems in C++, How do I discover types and construct components?

I'm working on an entity component system in C++ that I hope to follow the style of Artemis (http://piemaster.net/2011/07/entity-component-artemis/) in that components are mostly data bags and it's ...
25
votes
5answers
2k views

Doing powerups in a component-based system

I'm just starting really getting my head around component based design. I don't know what the "right" way to do this is. Here's the scenario. The player can equip a shield. The the shield is drawn ...
8
votes
2answers
5k views

Entity Component Systems with C++ - Accessing components

(What I'm describing is based on this design: What is an entity system framework?, scroll down and you'll find it) I'm having some problems creating an entity-component system in C++. I have my ...
19
votes
2answers
2k views

Component-Based System online resources

I've been considering moving to a more component-based approach in my games. Does anyone else have any decent reference material or sample implementations that would help make this transition a little ...
22
votes
4answers
2k views

Appropriate level of granularity for component-based architecture

I'm working on a game with a component-based architecture. An Entity owns a set of Component instances, each of which has a set of Slot instances with which to store, send, and receive values. Factory ...
7
votes
2answers
4k views

Tips for Component Based Entity System message handling

I'm trying to implement a component-based entity system but am a bit confused on how I should handle the messaging. There are two problems I'd like to resolve so I can test the system. Below is the ...
9
votes
3answers
4k views

Entity Component System based engine

Note: I'm programming this in Javascript, but it should be language agnostic in the most part. I am thinking about converting my engine to an ECS based one. I get the basic idea (note: this is ...
6
votes
4answers
683 views

Identifying Entity 'Types' in an Entity-Component System

If an Entity has no explicit 'type' (e.g. player) and is simply a collection of components, how do I identify the entities that my systems should and should not be working on? For example, in a game ...
7
votes
3answers
3k views

Input handling in component based design

I know this question has been asked several times, but I'm still not sure how to implement input handling in a component based engine. The component based design I used was based on T=Machine's blog ...
7
votes
3answers
2k views

Role of an entity state in a component based system?

Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what ...
21
votes
3answers
4k 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 ...
11
votes
2answers
4k views

Game state and input handling in component-based entity systems

My question is: How can I handle game states in my entity system, without resorting to keeping a stack of game state objects around? So the design of my entity system means that when an entity needs ...
9
votes
3answers
751 views

Grouping entities of the same component template to linear containers

EDIT: Looks like people are actually doing this! http://www.randygaul.net/2013/05/20/component-based-engine-design/ Another example of using this data accesing pattern. I've done a lot of research ...
6
votes
4answers
3k views

Entity System and rendering

Okey, what I know so far; The entity contains a component(data-storage) which holds information like; - Texture/sprite - Shader - etc And then I have a renderer system which draws all this. But ...
8
votes
1answer
1k views

How to handle materials in an Entity/Component system

My E/C implementation is the basic one where Entities are just ID's, Components are data and Systems act on the Data. Right now I'm having trouble with object materials and rendering in general. For ...
8
votes
2answers
3k views

How to structure game states in an entity/component-based system

I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
11
votes
4answers
4k views

Game engine with good Lua entity creation/management [closed]

I'm looking for an engine that constructs it's entities using Lua or other scripting language. This is in order to find inspiration and do it in my own engine as well. I know that Cryengine does use ...
8
votes
2answers
870 views

How to manage all the NPC/AI objects on the server?

I'm writing a simple MMO, and currently have the the server-client architecture in place for multiple users to see each other and be able to move around together...now its time to add enemies. Was ...
7
votes
3answers
2k views

How to update entity states and animations in a component-based game

I'm trying to design a component-based entity system for learning purposes (and later use on some games) and I'm having some troubles when it comes to updating entity states. I don't want to have an ...
7
votes
2answers
2k views

Book about Entity System?

I'm really interested about the capabilities of Entity System. I'm trying to search for a good book on this one, but failed. I don't want to get lost on learning this paradigm so a book will be a big ...
5
votes
0answers
332 views

Techniques for incorporating physics engines like Box2D into a Component-based Entity System [closed]

Currently i'm working with my own physics engine, however given the fact that the emscripten ports have gotten incredibly good, i wanted to try and incorporate Box2D into my entity system for the next ...
5
votes
3answers
846 views

Actually utilizing relational databases for entity systems

Recently I was researching several entity systems and obviously I came across T=Machine's fantastic articles on the subject. In Part 5 of the series the author uses a relational schema to explain how ...
2
votes
2answers
1k views

How to use batch rendering with an entity component system?

I have an entity component system and a 2D rendering engine. Because I have a lot of repeating sprites (the entities are non-animated, the background is tile based) I would really like to use batch ...
6
votes
1answer
1k views

Designing generic render/graphics component in C++?

I'm trying to learn more about Component Entity systems. So I decided to write a Tetris clone. I'm using the "style" of component-entity system where the Entity is just a bag of Components, the ...
7
votes
3answers
775 views

Overriding component behavior

I was thinking of how to implement overriding of behaviors in a component based entity system. A concrete example, an entity has a heath component that can be damaged, healed, killed etc. The entity ...
6
votes
2answers
689 views

Data Structure (or algorithm) for fast distance-based entity lookups

For example, your game has 100 enemies (on different teams) running around and their AI wants to inspect the nearby entities to see which it should attack. What is a fast way to organize those ...
2
votes
2answers
162 views

How might I script the creation of CLR objects?

I am looking for a method to script the creation of entities (arrays of components) for delivery through my entity factory, i.e scripted creation of .net objects. I have looked into Lua but it seems ...
2
votes
1answer
1k views

State / Screen management in Entity Component Systems

My entity/component system is happily humming along and, despite some performance concerns I initially had, everything is working fine. However, I've realized that I missed a crucial point when ...
1
vote
1answer
265 views

Need opinions on my component based design [closed]

I have an Entity class and a Component class. The Entity class has a list of attached components, and each component also has a member variable that is a reference to the entity that it is attached to ...
1
vote
1answer
147 views

Positioning sprites in a Component-Entity engine

I'm building my first component/entity engine and I'm not so sure about some of my choices. I'm here asking suggestions on my first doubt. I draw objects with 2 different behaviours: 1) Position ...
2
votes
1answer
131 views

Timestamps as ids in an entity manager?

I've built my own entity manager, as I found out some days ago, it is very similar to the Artemis framework. For now, I just use integers as entity ids. Behind the scenes, there is a simple integer ...
1
vote
1answer
208 views

Is there any reason not to make all my components a single class?

What would be the downside to using a generic all-encompassing Component class versus specific classes (PositionComponent, InputComponent, et cetera) for each component in an entity/component system? ...