Component-based designs rely on separating the multiple logical attributes of business objects and game objects into small components dedicated only to specific tasks. Whereas game objects are usually modeled to reproduce the attributes and behavior of "real world" objects by aggregating them ...

learn more… | top users | synonyms

87
votes
1answer
13k views

Role of systems in entity systems architecture

I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting. However I don't know how this completely works with the ...
18
votes
6answers
3k views

Would it be better to use XML/JSON/Text or a database to store game content?

I'm considering how to implement a component-based game, as that seems to be the hot thing and I like the idea of such a flexible design. One of the features of such a design is that adding new ...
49
votes
1answer
8k views

Using component based entity system practically

Yesterday, I've read a presentation from GDC Canada about Attribute / Behaviour entity system and I think it's pretty great. However, I'm not sure how to use it practially, not just in theory. First ...
20
votes
3answers
4k views

How to properly implement message handling in a component based entity system?

I am implementing an entity system variant that has: An Entity class that is little more than an ID that binds components together A bunch of component classes that have no "component logic", only ...
20
votes
5answers
4k 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 ...
18
votes
4answers
3k views

Are there existing FOSS component-based frameworks?

The component based game programming paradigm is becoming much more popular. I was wondering, are there any projects out there that offer a reusable component framework? In any language, I guess I ...
21
votes
6answers
5k views

What designs are there for a component based entity system that are user friendly but still flexible?

I've been interested in the component based entity system for a while, and read countless articles on it (The Insomiac games, the pretty standard Evolve Your Hierarchy, the T-Machine, Chronoclast ... ...
17
votes
2answers
3k views

How are physics or graphics components typically built in a component-oriented system?

I have spent the last 48 hours reading up on Object Component systems, and feel I am ready enough to start implementing it. I got the base Object and Component classes created, but now that I need to ...
10
votes
3answers
2k views

Why is it a bad idea to store methods in Entities and Components? (Along with some other Entity System questions.)

This is a followup to this question, which I answered, but this one tackles with a much more specific subject. This answer helped me understand Entity Systems even better than the article. I've ...
30
votes
2answers
8k views

Entity/Component Systems in C++, How do I discover types and construct components?

I'm working on an entity component system in C++ that I hope to follow the style of Artemis (http://piemaster.net/2011/07/entity-component-artemis/) in that components are mostly data bags and it's ...
13
votes
6answers
4k views

Game Components, Game Managers and Object Properties

I'm trying to get my head around component based entity design. My first step was to create various components that could be added to an object. For every component type i had a manager, which would ...
23
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 ...
19
votes
2answers
2k views

Component-Based System online resources

I've been considering moving to a more component-based approach in my games. Does anyone else have any decent reference material or sample implementations that would help make this transition a little ...
22
votes
4answers
2k views

Appropriate level of granularity for component-based architecture

I'm working on a game with a component-based architecture. An Entity owns a set of Component instances, each of which has a set of Slot instances with which to store, send, and receive values. Factory ...
35
votes
6answers
9k views

Component-based game object systems in practice

Let's see history of success. Which popular games (and game engines) were built using component-based game object system? Each answer should contain: Game Title (one per answer) Author / Company ...
16
votes
4answers
3k views

How to implement behavior in a component-based game architecture?

I am starting to implement player and enemy AI in a game, but I am confused about how to best implement this in a component-based game architecture. Say I have a following player character that can ...
9
votes
3answers
4k views

Entity Component System based engine

Note: I'm programming this in Javascript, but it should be language agnostic in the most part. I am thinking about converting my engine to an ECS based one. I get the basic idea (note: this is ...
9
votes
3answers
2k views

Component-based design: handling objects interaction

I'm not sure how exactly objects do things to other objects in a component based design. Say I have an Obj class. I do: Obj obj; obj.add(new Position()); obj.add(new Physics()); How could I then ...
11
votes
4answers
2k views

How can I design an effective game object interaction scheme with a component-based architecture?

This is a design question... I'm sure this could be generalized more, but I'm having a hard time with it. I am wondering about design for game object interactions - here is my example (2D ...
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 ...
6
votes
2answers
788 views

When/where to update components

Instead of my usual inheritance heavy game engines I'm toying with a more component based approach. However I have a hard time justifying where to let the components do their thing. Say I have a ...
8
votes
2answers
722 views

State changes in entities or components

I'm having some trouble figuring how to deal with state management in my entities. I don't have trouble with Game state management, like pause and menus, since these are not handled as an entity ...
6
votes
4answers
2k views

Retrieving components from game objects (entities)

Using C# and XNA 4, I've made the decision to go for an entity-component based design for my game after reading such posts as this and this, but I'm now struggling to find how to retrieve components ...
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 ...
7
votes
3answers
2k views

Role of an entity state in a component based system?

Component-based entity systems are all the rage these days; everyone seems to agree they are the way to go, but no one really has a definitive implementation of such a system. I was wondering, what ...
19
votes
3answers
4k views

In an Entity-Component-System Engine, How do I deal with groups of dependent entities?

After going over a few game design patterns, I have settle with Entity-Component-System (ES System) for my game engine. I've reading articles (mainly T=Machine) and review some source code and I ...
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 ...
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 ...
9
votes
1answer
868 views

Am I on the right track with this component architecture?

I've recently decided to revamp my game architecture to get rid of deep class hierarchies and replace them with configurable components. The first hierarchy I'm replacing is the Item hierarchy and I ...
7
votes
2answers
3k views

How to structure game states in an entity/component-based system

I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
10
votes
5answers
3k views

How to properly handle collision in a component-based game?

Trying to wrap my head around the ways to properly handle collision in a game designed around components. I see many examples have some sort of PhysicsComponent that gets added to the entity's list ...
6
votes
3answers
1k 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 ...
5
votes
2answers
1k views

Component based game engine and dependencies - singletons [closed]

I am thinking about how to create component based game engine. I understand that all things should be very similar as in Data Oriented Design (each object is a collection of various structures as ...
5
votes
6answers
2k views

How to implement a component based system for items in a web game

Reading several other questions and answers on using a component based system to define items I want to use one for the items and spells in a web game written in PHP. I'm just stuck on the ...
5
votes
0answers
275 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 ...
6
votes
1answer
1k views

Designing generic render/graphics component in C++?

I'm trying to learn more about Component Entity systems. So I decided to write a Tetris clone. I'm using the "style" of component-entity system where the Entity is just a bag of Components, the ...
1
vote
2answers
677 views

Is there any option other than Component Based for game architecture?

Having read a lot recently on Component Based systems (for games), i find it hard to go back to my earlier state of mind. If static object hierarchies fail to model "objects with a dynamic set of ...
7
votes
3answers
739 views

Overriding component behavior

I was thinking of how to implement overriding of behaviors in a component based entity system. A concrete example, an entity has a heath component that can be damaged, healed, killed etc. The entity ...
3
votes
1answer
789 views

Fundamental physics component(s) in component-based game engine

What are the "smallest" physics components in your component-based game engine? Would it make sense to create something like Positionable, Rotatable, Movable, Collidable and combine them the way you ...
4
votes
3answers
470 views

Getting Started with Component Architecture: DI?

TLDR: if I have entities like Ship and Bullet and components like Positionable and Drawable, should I create interfaces for each component and inject them into my entities using DI, or should I be ...
1
vote
1answer
100 views

Where to put my entity component messaging functionality?

I've done my research and read as many articles and posts on messaging and ECS's as I could find to help me get mine working. However, I'm at a roadblock on how to get my messag functionality to be ...