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

2
votes
1answer
175 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 ...
1
vote
1answer
299 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 ...
6
votes
2answers
506 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
318 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
162 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
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 ...
3
votes
1answer
750 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 ...
1
vote
1answer
258 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 ...
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
2k 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
655 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
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 ...
2
votes
1answer
402 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
461 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 ...
4
votes
2answers
485 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. ...
0
votes
1answer
453 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 ...
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
671 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 ...
1
vote
1answer
345 views

Entity Component Systems with Model View Controller

Can the Model View Controller design pattern be used with non-OOP coding style, specifically with Entity Component System?
2
votes
3answers
597 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 ...
6
votes
1answer
1k 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
931 views

Question on the implementation of my Entity System

I am currently creating an Entity System, in C++, it is almost completed (I have all the code there, I just have to add a few things and test it). The only thing is, I can't figure out how to ...
2
votes
1answer
193 views

Should I wrap a template function with another template function, or…?

I'm currently making an Entity System, using C++, and I've questioned myself about how I should interface some methods. Specifically in my Entity and ComponentManager classes. The ComponentManager, ...
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
359 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. ...
4
votes
1answer
1k 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
754 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 ...
3
votes
3answers
1k views

SceneManagers as systems in entity system or as a core class used by a system?

It seems entity systems are really popular here. Links posted by other users convinced me of the power of such system and I decided to try it. (Well, that and my original code getting messy) In my ...
1
vote
1answer
473 views

Is component-based design an architectural pattern or design pattern?

When using the component-based paradigm in game development with engines like Unity, is component-based design an architectural pattern, or a design pattern? Can I even say that component-based ...
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 ...
3
votes
4answers
286 views

Sprite and Physics components or sub-components?

I'm taking my first dive into creating a very simple entity framework. The key concepts (classes) are: Entity (has 0+ components, can return components by type) SpriteEntity (everything you need to ...
8
votes
2answers
616 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 ...
7
votes
1answer
477 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 ...
2
votes
1answer
1k views

State / Screen management in Entity Component Systems

My entity/component system is happily humming along and, despite some performance concerns I initially had, everything is working fine. However, I've realized that I missed a crucial point when ...
3
votes
1answer
1k views

How a “Collision System” should be implemented?

My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do 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 ...
6
votes
6answers
3k views

Logic in Entity Components Systems

I'm making a game that uses an Entity/Component architecture basically a port of Artemis's framework to c++,the problem arises when I try to make a PlayerControllerComponent, my original idea was ...
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 ...
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. ...
2
votes
0answers
376 views

ECS, databases, XML and serialization

My entity/component/system engine is coming along quite nicely; I have two very different apps working on the same executable. (One 2-d scroller, one 3D Asteroids-type game). In the interest of ...
1
vote
1answer
360 views

How should I share variables between instances/classes?

I'm making a game using LOVE, so everything is programmed in Lua. I've been experimenting with using classes and object orientation recently. I've found out that a nice system to use is having most of ...
3
votes
2answers
598 views

Adding sub-entities to existing entities. Should it be done in the Entity and Component classes?

I'm in a situation where a player can be given the control of small parts of an entity (i.e. Left missile battery). Therefore I started implementing sub entities as follow. Entities are Objects with ...
2
votes
2answers
1k views

How to use batch rendering with an entity component system?

I have an entity component system and a 2D rendering engine. Because I have a lot of repeating sprites (the entities are non-animated, the background is tile based) I would really like to use batch ...
0
votes
1answer
514 views

Initializing entities vs having a constructor parameter

I'm working on a turn-based tile-based puzzle game, and to create new entities, I use this code: Field.CreateEntity(10, 5, Factory.Player()); This creates a new Player at [10; 5]. I'm using a ...
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 ...
5
votes
1answer
778 views

Entity component system - where did attributes and behaviors come from?

I recently spent quite some time understanding and building a component-based system. I got stuck on a few problems and after searching for quite some time ran across this answer which is talking ...
9
votes
3answers
3k 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
736 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 ...
3
votes
3answers
2k views

Handling movement in an Entity Component System

I'm working on a 2d RPG game in C# using an Entity-Component-System architecture, and I'm currently working on movement. Right now, I'm wondering how to organise the code so it looks a bit more.. ...
6
votes
2answers
2k views

Collision detection and response in an Entity System

More fun with an ES... Currently, I have a few systems: Renderer (Renderable attribute, Transform attribute) Motion (Movable attribute, Transform attribute, Renderable attribute [for bounding ...