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
vote
1answer
299 views

AI of Turn Based game using Entity System approach

I just recently learned about Entity Systems and want to try it out on a real example (I was developing a game recently and want to try to port it over Entity Systems). But I got problem right away. ...
1
vote
1answer
136 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 ...
1
vote
3answers
1k 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 ...
8
votes
3answers
664 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 ...
5
votes
3answers
266 views

How can I achieve strong typing with a component messaging system?

I'm looking at implementing a messaging system in my entity component system. I've deduced that I can use an event / queue for passing messages, but right now, I just use a generic object and cast out ...
4
votes
2answers
613 views

Allocating Entities within an Entity System

I'm quite unsure how I should allocate/resemble my entities within my entity system. I have various options, but most of them seem to have cons associated with them. In all cases entities are ...
3
votes
1answer
533 views

Entity System with C++ templates

I've been getting interested in the Entity/Component style of game programming, and I've come up with a design in C++ which I'd like a critique of. I decided to go with a fairly pure Entity system, ...
4
votes
1answer
265 views

Box2D Joints in entity components system

I search a way to have Box2D joints in an entity component system, here is what i found : 1) Having the joints in Box2D/Body component as parameters, we have a joint array with an ID by joint and ...
0
votes
3answers
422 views

Rendering order in an Entity System

Say I use a basic ES approach, and also inside Systems I hold lists of all entities that Systems are required to process. How do I maintain this list of entities in desired rendering order, i.e. for ...
5
votes
4answers
595 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
3answers
1k 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 ...
2
votes
1answer
584 views

Movement & Physics in an entity-component system

I'm currently playing around with entity-components systems and got started on the movement/collision/physics parts and would like to have some pointers! It's a basic 2D sidescrolling game, with the ...
2
votes
1answer
258 views

Where to put common System functionality in Entity-System Design?

I am working on an Entity System design based largely off of Adam Martin's design and Ray Wenderlich's Objective-C Implementation. I am working on the AI system using a state machine with a System ...
8
votes
2answers
4k 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 ...
2
votes
1answer
281 views

Questions about the details of implementing a component-based entity system [closed]

I started reading about component-based entities, and overall it seems like a good idea, but many of it seems to skip over a lot of details and not give many real examples, so there are things that ...
1
vote
0answers
102 views

Events with Entity Component Systems [duplicate]

I'm currently working on an HTML5 top-down simple RPG game, and as a learning experience I'm building my own little engine from scratch. After reading around a little I decided to go with the Entity ...
2
votes
1answer
279 views

Different kinds of movement in component based entity system

I am writing a pong clone with a component based entity system. But I am having trouble with the different kinds of movement in the game. The problem is the following: My paddles will just move up ...
2
votes
1answer
785 views

Tilemap collision in component based entity system

I am trying to set up a collision system for a tilemap in my component based entity system, but having trouble with figuring out how to do so. Currently I have the following approach: My tilemap ...
1
vote
2answers
418 views

best structure to handle entities in an entity component based game engine

I am trying to develop a 2D entity component based game with multiple layers as tilemaps (front or back from the scene). I currently handle the tilemap layers in a 3 dimension array[z][y][x]. Each ...
1
vote
2answers
262 views

Entity Component Model - Creating The Component “Watcher”

Hello Stack Exchange, I apologize if this has been asked already, but I couldn't find an answer through searching...probably due to being unable to describe what I am looking for very well. So, ...
5
votes
1answer
266 views

Design to handle logic within a state

I am designing a new game and I am trying out the entity-component design where entities are comprised of groups of components holding a bunch of attributes. I also have a stack of 'game states' and ...
-1
votes
1answer
213 views

Overload C++ functions in lua [closed]

I have had a look around but I believe this to be impossible due to compile time of c++. However is it possible to have a class registered in lua and c++ that has a overload update function which I ...
5
votes
0answers
274 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 ...
0
votes
2answers
210 views

Hex tile systems and the efficient use of classes

So I've built myself a system of classes for what I think is an efficient way to describe an entity that would live in my game. Is this an effective approach or am I creating entities that are too ...
2
votes
1answer
163 views

Selecting the entities needed for rendering [duplicate]

Currently I'm sorting and looping every entity on my level but I really don't need to. Only a small subset would be on screen. If I could extract a list of entities from my main list that are on ...
6
votes
2answers
357 views

How to share Lua script between instances?

I'm doing an agent based framework with C++ and Lua. I want to use Lua to code the Agent behaviour having an AgentClass class that have the name and source code and an AgentInstance class that have ...
0
votes
2answers
291 views

Attribute ownership in Entity Component systems

How do you typically handle data ownership in these systems? Right now I just have a map that maps type(std::string or hashed int)->void* where outside sources can add attributes via a simple ...
2
votes
2answers
155 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 ...
7
votes
3answers
2k 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 ...
3
votes
1answer
612 views

How does Component Entity System Manages Game Mode?

I would like to create a simple game fire and shoot game using Component Entity System (CES). This game has two game modes(1): play mode and settings mode. The play mode is the actual game itself ...
11
votes
2answers
3k 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 ...
1
vote
1answer
251 views

How a “view” is handled in an Entity-Component based model?

Coming from an MVC background, I am trying to understand Entity-Component based model. However, i can see description about the use components( data objects ) and entities ( group of different ...
1
vote
1answer
260 views

Server architecture software side

I'm making a game some like Terraria. I have a couple of prototypes, but most of them use a "entity-component-system"(ESC) and some custom terrain implementation. Now I've reached the part where I ...
2
votes
4answers
1k views

How should IDs be assigned in an entity component system?

I haven't actually implemented this system yet. I'm trying to work through the major conceptual hurdles before I actually start writing code, and the proper way to generate IDs is a little confusing ...
5
votes
2answers
1k views

Entity Component System: Retrieving components quickly [duplicate]

Possible Duplicate: Retrieving components from game objects (entities) I'm working on an entity-component-system game at the moment. I've looked in particular at the Artemis framework and a ...
3
votes
2answers
561 views

Handling movement using an Entity Component-based System Architecture

I have seen various descriptions of how to handle movement in a component-based entity framework. The most common I've stumbled across is the idea of using components called Controller, Physics, ...
7
votes
2answers
3k 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 ...
2
votes
1answer
352 views

High volume sprite management in entity component system

I'm working on an entity-component-system based 2.5d game. That is, entities are groups of components that are processed by systems. I am having a hard time seeing how a sprite rendering system, that ...
0
votes
1answer
353 views

Abstracting the ability to attack using an ECS

As the title suggests, my question is how to abstract the concept of 'attacking' using an ECS (entity component system). The "game" I'm working on is a roguelike in real-time, where all ...
0
votes
1answer
343 views

How to resolve duplicate data in Entity Systems?

Whilst working on examples and upgrades for my C++ Entity System, something randomly caught the attention of my mind, by surprise: duplicate data. What I'm referring to is how an entity system that ...
4
votes
2answers
448 views

Entity systems with mixed responsibilities (eg render + handle input)

I am using an entity system for my hobby game, specifically the Behaviour / Attribute model discussed in Radical Entertainment's Theory and Practice of Game Object Component Architecture presentation. ...
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 ...
2
votes
2answers
593 views

In an Entity-Component System, how to represent the world/level/gameboard?

I am trying to learn more about Entity-Component Systems, and something that kinda stuck out at me was the question of how to represent the world in such a system? More specifically, I'm trying to do ...
5
votes
1answer
872 views

Component/Entity-based design + Behavior Trees => how to integrate?

For my current project I implemented a component/entity-based system, basically following most of the best-practice there is in this rather undefined area. So I got (slightly extended) Entities, ...
2
votes
3answers
487 views

Component / Entity-based design => no inheritance at all?

[I understand that this this could be seen as a rather theoretical question, but I think it has real-application impact]. "Academic" base With a component-based design one wants to get rid of the ...
5
votes
4answers
1k views

Should each Entity have its own update and render methods?

First, the questions: Should each Entity (which are classes like Character, Tree, Enemy) have its own update() and render() methods? If that's the case, then should I use Interfaces like ...
1
vote
1answer
334 views

Bullets and projectiles in component based entity systems

Currently one of my games engines written for a shooter seems to work correctly. Currently projectiles are sparse, travel quite slowly and are synced over network they are generated as entities. ...
3
votes
1answer
626 views

Entity property system

In lieu of a typical implementation of entity-component systems, I've gone the data-oriented route described by Jason Gregory in Game Engine Architecture. This works really well for common properties ...
3
votes
1answer
866 views

Why would typeof(T) kill performance?

TLDR: using typeof(T) twice; assigning the value to a variable and reusing that = uber fast (30FPS), actually calling typeof(T) twice = derped (5FPS). Why? I have a simple entity/component system; ...
4
votes
2answers
682 views

Where to generate data in an Entity-Component System?

So I'm making a small game where I generate 2D landscape using perlin noise when the game first loads. I've got it working in a OO way, but want to move over to an ES architecure, and I'm just ...