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
0answers
43 views

Who Handles Collision in a Component Based Entity System

I kind of stucking at my current plattformer protoype for learning the component based entity system pattern. I have CollisionComponent and a CollisionSystem. The CollisionSystem checks every frame ...
0
votes
3answers
143 views

Entity Component Architecture and Scripting without using threads

I am working on a small game engine for practicing purpose and also for putting some of my ideas into action. What I have so far is a couple of systems for rendering, sound etc. The next step is to ...
0
votes
2answers
83 views

How to cleanly serialize/de serialize a Dictionary whose values are of a derived class using c# newtonsoft json [closed]

I am working on and entity component system and I am storing entities as a JSON file. Components are stored in an entity as a Dictionary of components. I am using newtonsoft's JSON library. After ...
1
vote
1answer
123 views

Component-Entity Systems Code Generation [closed]

I'm really enjoying component entity approach (I'm currently using ASH haxe, but particular language/framework doesn't really matter). However the problem is - there're way too many elementary ...
1
vote
3answers
230 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 ...
1
vote
1answer
119 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
206 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
282 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
4answers
334 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
465 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 ...
1
vote
2answers
177 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
245 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
466 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
117 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
480 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
149 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
192 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
212 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
213 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
262 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
189 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
149 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
482 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
203 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
128 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
561 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
179 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
176 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
459 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
185 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
209 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
116 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
184 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
87 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
119 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
235 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
333 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
328 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
218 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
393 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
427 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
101 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
1k 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
261 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
267 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
211 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
592 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
331 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
658 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 ...