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

-1
votes
2answers
84 views

I want to do an ECS Game, what would be a good replacement for XNA [closed]

In the past, I've made some little games for fun, and I want to start a new project. I want to use Entity / Component Paradigm, and I would have liked to use Artemis for .NET That said, I had a pretty ...
1
vote
3answers
182 views

Issues with ECS performance

I'm currently implementing ECS in "classic" sense, as defined by this wonderful post, where we have Entities, Components and Systems. And I'm having a serious (for me) performance issues. They come ...
0
votes
0answers
38 views

c++ factory pattern component creator with singleton container [migrated]

I'm implementing the factory pattern for component creation and want to implement a singleton container for all instances of each type created by the factory. Ideally this would be one vector for each ...
1
vote
1answer
88 views

Entity Component System: Store pointer in Component to Entity

I was wondering if it is a bad idea to store a pointer in every Component to the Entity which owns the Component. E.g. I have a Component "NPC". Each entity which owns this Component also must have ...
0
votes
1answer
114 views

Communication pattern in Entity Component System

I'm putting together a ECS for my game with another two main components: an event bus for communication and a Lua interpreter to load scripts. Now, the parent element is a framework/game object with ...
1
vote
2answers
254 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 ...
2
votes
2answers
239 views

Executing Components in an Entity Component System

Ok so I am just starting to grasp the whole ECS paradigm right now and I need clarification on a few things. For the record, I am trying to develop a game using C++ and OpenGL and I'm relatively new ...
11
votes
1answer
414 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 ...
0
votes
2answers
149 views

Implementig State-driven agents in an Entity-Component-System

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" ...
1
vote
1answer
192 views

How can I correctly use an 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 ...
2
votes
1answer
367 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() ...
0
votes
1answer
101 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
464 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 ...
0
votes
2answers
140 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
181 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
172 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. ...
0
votes
1answer
185 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 ...
2
votes
2answers
248 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 ...
2
votes
3answers
181 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 ...
2
votes
1answer
143 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
422 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
199 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
119 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
483 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
175 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
159 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 ...
4
votes
3answers
429 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 ...
1
vote
1answer
164 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 ...
4
votes
2answers
195 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 ...
3
votes
1answer
111 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 ...
1
vote
2answers
176 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
84 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
118 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
218 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
321 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
140 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
317 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 ...
2
votes
1answer
213 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
373 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 ...
3
votes
2answers
389 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 ...
0
votes
1answer
100 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 ...
8
votes
1answer
980 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 ...
3
votes
1answer
242 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
254 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
204 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
571 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 ...
2
votes
2answers
315 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
2answers
627 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 ...
2
votes
1answer
294 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
167 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 ...