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

95
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 ...
88
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: ...
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 ...
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 ...
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 ...
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 ...
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 ... ...
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 ...
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 ...
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 ...
13
votes
3answers
3k views

Organizing an entity system with external component managers?

I'm designing a game engine for a top-down multiplayer 2D shooter game, which I want to be reasonably reuseable for other top-down shooter games. At the moment I'm thinking about how something like an ...
12
votes
4answers
834 views

How can I assign entity IDs in a robust way in a network game?

I'm working on an entity system for a networked game and I'm assigning each entity a unique 32-bit integer id that I can use to serialize references to entities and the entities themselves. Currently ...
12
votes
5answers
761 views

Why place entity config outside of scripts?

I've seen a lot of games that define the entity components in script files, but when they configure each entity and specify what components it has, they use some other file format (like XML). Why do ...
11
votes
3answers
1k views

How to code UI / HUD in Entity System?

I think I already got the idea of the Entity System inspired by Adam Martin (t-machine). I want to start using this for my next project. I already know the basic of Entity, Components, and Systems. ...
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 ...
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 ...
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 ...
10
votes
1answer
226 views

How are entity systems cache-efficient?

Lately I've been doing a lot of reading on entity systems to implement in my game engine (C++/OpenGL). The two key benefits that I constantly hear lauded about entity systems are 1) the easy ...
10
votes
2answers
1k views

Handling scripted and “native” components in a component-based entity system

I'm currently trying to implement a component-based entity system, where an entity is basically just an ID and some helper methods tying a bunch of components together to form a game object. Some ...
9
votes
3answers
4k views

Component entity system - Updates and call orders

In order to get components to be able to update every frame (and leave this functionality out of components that don't need to) I got the idea to make an UpdateComponent component. Other components ...
9
votes
3answers
2k views

Creating Entity as an aggregation

I recently asked about how to separate entities from their behaviour and the main answer linked to this article: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ The ultimate concept ...
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 ...
9
votes
2answers
358 views

Efficiently separating Read/Compute/Write steps for concurrent processing of entities in Entity/Component systems

Setup I have an entity-component architecture where Entities can have a set of attributes (which are pure data with no behavior) and there exist systems that run the entity logic which act on that ...
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 ...
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
1answer
856 views

How to benefit from cpu cache in a entity component system game engine?

I often read in the ECS game engine documentations that is a good architecture for using cpu cache wisely. But I can't figure how we can benefit from cpu cache. If components are saved in an array ...
8
votes
2answers
727 views

Doesn't multiple inheritance solve all problems that entity systems do?

The question is pretty self explaining: doesn't multiple inheritance solve all the problems that entity systems also solve? I just remembered a term called "multiple inheritance", and that seems to ...
8
votes
3answers
737 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 ...
8
votes
5answers
948 views

Managing multiple references of the same game entity in different places using IDs

I've seen great questions on similar topics, but none that addressed this particular method: Given that I have multiple collections of game entities in my [XNA Game Studio] game, with many entities ...
8
votes
2answers
603 views

Many sources of movement in an entity system

I'm fairly new to the idea of entity systems, having read a bunch of stuff (most usefully, this great blog and this answer). Though I'm having a little trouble understanding how something as simple ...
8
votes
3answers
2k views

Composition heavy OOP vs pure entity component systems? [closed]

I admit, I have made the sin of overusing, and even abusing inheritance. The first (text) game project that I made when I was taking my OOP course went as far as "Locked door" and "unlocked door" from ...
8
votes
2answers
861 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 ...
8
votes
1answer
1k views

Abstracting Entity System animation states

I recently started designing a Game Engine using the Entity System paradigm, i.e. having entities as an aggregation of components, and systems that implement the actual game. Whereas I've had ...
8
votes
1answer
774 views

Processing component pools problem - Entity Subsystem

Architecture description I'm creating (designing) an entity system and I ran into many problems. I'm trying to keep it Data-Oriented and efficient as much as possible. My components are POD ...
7
votes
3answers
1k views

Component based entity system API naming problems

My engine uses a component-based entity system internally, and I want to bind it to Lua for scripting. Now, I want to save people who write scripts for it typing work. In C++, to set the position of ...
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 ...
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 ...
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
2answers
540 views

Particles/instancing groups in an Entity/Component system

I've been playing with an entity/component/system design recently, and I've come across a couple of stumbling blocks. Instancing Let's say I have a few hundred "things" (asteroids, chickens, ...
7
votes
2answers
2k views

Tilemaps in a Entity System Framework?

I have been reading up on Entity System Frameworks specifically Artemis. I am trying to decide if it is right for me. I strictly work on tile based 2d pixel art games, and I don’t think they will ever ...
7
votes
3answers
773 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 ...
7
votes
1answer
460 views

Entity Type specific updates in entity component system

I am currently familiarizing myself with the entity component paradigm. For an example, take a collision system, that detects if entities collide and if they do let them explode. So the collision ...
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
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 ...
7
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 ...
6
votes
4answers
671 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 ...
6
votes
5answers
881 views

Whats the most efficient method for controlling entities?

I'm creating a tower defense game and I'm having logistical issues trying to figure out how to best have all of the enitites do their apporiate task. I have considered just constantly looping through ...
6
votes
3answers
2k views

How to avoid “Blob-Systems” in an entity component system?

Currently I am facing the following problem: I am trying to write a pong clone by using an entity component system (ECS). I wrote the "framework" all by myself. So there is a class which manages ...
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 ...