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

0
votes
1answer
70 views

Entity Component Architecture - initialization between multiple components

I'm starting work on an game set in an isometric world, and I'm having a bit of trouble understanding how to implement certain aspects of the entity component system idea. Here are the Components and ...
5
votes
3answers
373 views

Modeling “singletons” in an Entity-Component System

I'm writing a basic Asteroids implementation as an exercise in learning how to think in entities and components, and most of it is fairly straightforward. But one thing I keep running into is ...
1
vote
1answer
80 views

Using unordered_multimap as entity and component storage

The Setup I've made a few games (more like animations) using the Object Oriented method with base classes for objects that extend them, and objects that extend those, and found I couldn't wrap my ...
3
votes
1answer
234 views

Entity Component System for HUD and GUI

This is a very rough sketch of how I currently have things designed. It should, at least, give an idea of how my ECS is currently designed. If you notice in that diagram, I have basically split ...
2
votes
1answer
174 views

How can I manage entities(in entity component system) using Lua scripts?

Suppose I have a code like this in C++ // Game.cpp Entity* hero; Entity* witch; ... // entity initialization if(/player near witch/) { if(hero->get<HealthComponent>()->getHealth() ...
2
votes
3answers
2k views

Entity System with C++

I'm working on a game engine using the Entity System and I have some questions. How I see Entity System : Components : A class with attributs, set and get. Sprite Physicbody SpaceShip ... System ...
0
votes
2answers
103 views

How can I efficiently update only the entities that matter in a given frame?

I'm making a RTS, which can potentially have lots of units in one map (think Age of Empires). I'm looking for a way to update my units. I want to avoid calling a virtual Update() method every frame ...
1
vote
1answer
133 views

How do I implement space partitioning in entity component system?

My systems work on components without needing to now anything about entities. I want to implement simple grid partitioning, so each entity will be given a cell based on its current position. But how ...
0
votes
1answer
136 views

ECS and life management of entities

I am done with my game's framework and I am trying to implement a life-management system. My framework so far has: Systems that hold pointers to the Entities they are interested in. An Engine ...
0
votes
1answer
134 views

What is the component for the AI system in a component-based entity implementation?

In order to wrap my head around component-based systems, I started making my own little framework. Unfortunately I am not completely sure how systems are supposed to be used in some specific cases. ...
2
votes
7answers
708 views

is ECS a kind of (or vs) OOP? [closed]

Is Entity Component System (ECS) considered a part of OOP or is it a completely different concept?
2
votes
2answers
207 views

What are the advantages of having component logic in a “system” versus the component itself?

For the past few days I've been trying to make my first game. I did some research on usual development practices and patterns and I settled on a composition system where the different components ...
1
vote
4answers
2k views

Entity System creating Components

Over every entity system I see implemented in C++, or even in Java/C# (e.g. the Artemis framework). I see components not allocated via a new operator (or something similar, e.g. std::make_shared). For ...
2
votes
3answers
151 views

How do I deal with different “types” of entities in Entity-Component-System model?

I have CollisionSystem which basically iterates through the array of PhysicsComponent and checks if there was some collision between two entities. But where should interaction code go? And how should ...
8
votes
1answer
805 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 ...
2
votes
1answer
112 views

Viewing one of multiple worlds in a component entity system?

I've been working on a space simulation game. The player can control a ship and fly through wormholes to get from one solar system to another. I would like the player to be able to switch the camera ...
1
vote
1answer
261 views

Scene Graphs and Entity Component Systems

I am trying to determine how to move my current implementation of nodes in a scene graph to an entity component system and am struggling to wrap my head around how the two can work together, if at ...
4
votes
1answer
186 views

What are Blackboards?

I am implementing an Entity System for my game. I am aiming for a larger procedurally generated world. The world will be filled by AI entities where "on screen" and "near screen" entities will be ...
1
vote
1answer
89 views

Drawing Sprites with Artemis

I am trying to trace the StarWarrior code (the Artemis tutorial). I cannot figure out how these sprites are being drawn. This is the code where the player's ship is initialized: /// ...
4
votes
5answers
359 views

How can I efficiently implement a bitmask larger than 64-bits for component existence checks?

In my ECS implementation, I use bit-wise operations (as described and illustrated in this thread) to tell an entity what type of components it currently consists of. So my Entity class has the ...
2
votes
1answer
140 views

ECS how to access multiple components (not the same one) in a system?

I'm implementing a basic entity component system from http://entity-systems.wikidot.com/rdbms-with-code-in-systems#java in C++, but I don't quite understand how I could do multiple components (not the ...
1
vote
3answers
121 views

in an ECS framework why are components indexed via their name rather than an Enum?

I have been reading through a number of discussions on ECS framework and very often I see components being referred to via name rather than through a string object such as an enum or a struct. I'm ...
1
vote
1answer
125 views

Where does event-based audio fit in a component-based entity system?

Assuming the underlying low level audio logic is encapsulated in some outside class... what is the best way to add audio effects to a component-based entity framework? I am taking the approach that ...
3
votes
2answers
157 views

How can I provide attribute extensibility in a component-based entity system?

This question and its answers move against utilizing an entity component system where the component itself is just a generic class with an dynamic container for the attributes/properties of the ...
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 ...
3
votes
1answer
93 views

EventManager adding data to the event message

Some backstory: I decided it was time to start making a game. I've got a bachelor degree in computer sciences, but I didn't really get to code much during my studies. I've started making a quick ...
5
votes
2answers
337 views

How to model interentity membership in entity-component architecture?

I'm falling in love with simple grace of entity-component design, although I still have issues breaking from MVC and OOP practices. Some of my game entities have membership relationships with each ...
1
vote
2answers
519 views

Entity Component System, weapon

I'm new to game programming and currently trying to understand Entity Component System design by implementing simple 2d game. By ECS I mean design, described here for example In my game I have ...
3
votes
2answers
332 views

Alternatives to storing all my entities in an SQL database

I've been trying to build my entity system based on pure SQL data storage as explained in this post series. The idea is that every entity or component is stored in an SQL table. I created my framework ...
1
vote
2answers
163 views

Is it feasible to use a DHT to span an MMO over many servers for improving reliability?

At the moment I have an idea for how to handle distributing MMO servers. At the core is a bunch of worker nodes that all share the same set of distributed hash tables. Each DHT stores a specific game ...
1
vote
3answers
81 views

How can I utilize external libraries within an entity system?

I'm implementing an entity system for educational purposes. I wanted to focus on the system itself and don't know much about rendering and physics, so I'm using external libraries for those tasks. ...
1
vote
1answer
114 views

How do I best solve multiple component modifications via a single event?

I'm trying to solve multiple component modifications via a single event. Is there a better way of handling this? I have an a label entity that cares about when a shield entity's hitpoints component ...
2
votes
2answers
185 views

Where should shaders and lights be in a component-based entity system?

Where should I put the shader and the light / shadow calculation? Should that be a component too? And should the rendering system know how to handle them or should there be a separate light system? ...
6
votes
2answers
283 views

Why are entities in a component system composed at run time?

Why are entity component systems the way they are? For example as far as I have seen it may look like this class Entity list of components add component remove component update ...
2
votes
2answers
129 views

Should widgets be part of a scene in a 2D game?

I'm in the middle of separating logic and drawing of a 2D game, i.e. I'm moving from scenes/entities that draw themselves to scenes/entities that merely store and update data, getting drawn by a ...
1
vote
2answers
287 views

How to associate entities in a Entity Component System (Artemis)

I want to implement an association between 2 entities in a ECS architecture using Artemis framework, which handles Components, Entities and Systems very well for me. I have an entity "Empire" (with ...
0
votes
1answer
324 views

How to use Bullet physics with Entity Component Systems?

I have an Entity Component system and I want to have a Physics Component that would add the given object to the physics simulation. My problem arises because the Bullet API requires me to add each ...
1
vote
1answer
206 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? ...
0
votes
1answer
94 views

Entity System handle graphics/textures [duplicate]

I use in Java Artemis(entity system library) and Slick2D(graphics library) for a game. Now I wonder me, how I should handle graphics(sprites, textures...). In the demos of the page from Artemis it ...
3
votes
1answer
206 views

Entity component systems and DDD: violation of encapsulation?

I'm using a hybrid of DDD (domain-driven development) and an entity-component system. That is to say: I have an Entity class with a list of Components, and the ability to add/remove/get components I ...
2
votes
2answers
231 views

In a ES system, how one would implement/ deal with Modifiers?

Given the normal entity-component-system architecture, lets say we a component that give the entity Strength. Now on the game flow I want to give +4 strength do to the wielded weapon. What would be ...
0
votes
1answer
193 views

How to keep Input System and Graphics System separate?

I want to keep Input System and Graphics System separate, but the Window Handler that's created by graphics component make everything really hard. How should I approach this situation?
0
votes
1answer
498 views

Superclassing RPG Game Entities [closed]

I am in the design process of an RPG game and I have no experience at all in game dev. This question is about how I should approach entity management using OOP classes. My train of thought is as ...
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 ...
9
votes
2answers
352 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 ...
2
votes
2answers
279 views

Handling cyclic dependencies in entity/components system

I built an rather standard C++ entity/component system (a bit like this one). Components can access other components through their associated Entity. This is usually done by getting some kind of ...
1
vote
1answer
258 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 ...
2
votes
1answer
272 views

Entity system and rendering types

I would like to implement entity system in my game and I've got some question about entity system and rendering. Currently, my renderer got two types of elements: Current design Mesh : A default ...
1
vote
1answer
151 views

Dealing with sprite loading and setting in an entity-component system

I've just started using an entity-component system for the first time and I'm having trouble making some decisions. Currently I've got a SpriteComponent that holds a sprite, a ...
2
votes
2answers
274 views

Confusion about systems implementation of ECS

For reference I am mostly imitating the architecture in this tutorial, the "Entity System" section: http://www.raywenderlich.com/24878/introduction-to-component-based-architecture-in-games NOTE: the ...