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 together and allowing specialized objects to inherit from general ones, component based design relies on composition rather than inheritance.
Questions tagged [component-based]
23 questions
21
votes
4 answers
Communication in component-based game engine
For a 2D game I'm making (for Android) I'm using a component-based system where a GameObject holds several GameComponent objects. GameComponents can be things such as input components, rendering components, bullet emitting components, and so on.…

Firas Assaad
- 25,006
- 16
- 61
- 78
9
votes
1 answer
Component based entity system in scala
I'm searching some library which implement the Component Based Entity System (ECS) framework used in multiple game and implementend in many game engine (unity, libgdx, etc.)
I'm starting a little game project in scala ( ECS roguelike), and at this…

reyman64
- 523
- 4
- 34
- 73
5
votes
1 answer
Is there a language made specifically for Entity Component programming?
I know there are languages for functional programming (LISP, Haskell, etc.) and OOP programming (Java, C#, Ruby, Python, many more), but are there any that are made around the concept of Entity Component Programming?

benbot
- 1,217
- 1
- 12
- 28
3
votes
1 answer
How to use entity component system for game design with stage, group and actor in libgdx for a whole system?
Entity component system is able to solve problems of scale which can come during OO programming in game development. I have few queries regarding ECS:
To give an overview: There are entities which include some components (having data) and systems…

Mitesh Sharma
- 261
- 4
- 14
3
votes
1 answer
Composite, component and entities in C++ game engine
I'm working on a school project developing a game. We use an engine made by one of the teams we have. The build-up of the engine is unclear to me and seems an anti-pattern. However, it seems that no one can make the design choices clear to me. The…

RB-Develop
- 196
- 1
- 9
3
votes
1 answer
Entity System in C++
I've recently discover the Entity System architecture and i've got some difficulties to do it in C++ / understand implementation.
How i see Entity System :
Components : A class with attributs, set and get.
Sprite
Physicbody
SpaceShip
...
System :…

Dono
- 522
- 7
- 11
2
votes
2 answers
Factory pattern : What to do when factory class is too big?
I am using entity-base-components system.
I have many type of stationary objects e.g.
Wall = blocks
Fire Turret = blocks + shooter
Water Turret = blocks + shooter
Bunker = blocks + spawner
Here is the factory of stationary…

javaLover
- 6,347
- 2
- 22
- 67
2
votes
1 answer
How to index all the derived components in a base component list in Entity
I am trying to do a entity component system design for simulation. Here is what confuses me now.
I am trying to make a Entity class
Entity.h
class Entity
{
public:
Entity();
virtual ~Entity() = 0;
…

Xú Jiāfēng
- 25
- 6
2
votes
1 answer
Entity Component System: Where to put rendering logic
I'm currently learning about "Entity Component System".
After reading many tutorials and forum threads I still wonder where rendering logic has to go. I am not talking about actual OpenGL/DirectX-Rendering code that, for example, takes a sprite and…

QnD
- 79
- 1
- 5
2
votes
2 answers
Domain Driven Design for Rails App: Implementing a service in a basic example
Two Models: An Owner and a Dog:
owner.rb
class Owner < ActiveRecord::Base
has_one :dog
end
dog.rb
class Dog < ActiveRecord::Base
belongs_to :owner
end
And here is the schema:
schema.rb
ActiveRecord::Schema.define(version: 123) do
…

Neil
- 4,578
- 14
- 70
- 155
2
votes
1 answer
Information on IoC/DI VS CBSE
I have a few questions concerning the differences between IoC and CBSE that I cant find for the life of me.
I have been using IoC/DI for quite a while now specifically with Laravel in PHP, so I like to think I have a pretty good grasp on how it…

Silent
- 438
- 2
- 6
- 19
1
vote
1 answer
Component Based Design (C# Game Engine)
I'm currently designing a 2D Game Engine in c#, using GDI+ and I've come across a horrible design flaw in my code.
The idea is that my game engine consists of multiple screens, each screen contains multiple game objects and each game object contains…
user6943628
1
vote
2 answers
angular: many components using reusable service
I'm following todd motto's styleguide for angular. And in his approach, and in john papa's approach as well, they say each component should have its own services in which they depend.
My question is, what happens when I have a service (e.g.…

monkeyBug
- 555
- 1
- 4
- 16
1
vote
1 answer
AngularJs 1.5 - Component Based Architecture, Bindings and Good Practices
following my question
Angularjs 1.5 - CRUD pages and Components
I've some additional design questions on component based architecture.
1- By Guidelines, if I have a child component with bindings from a parent, I should handle data manipulation on…

Massimo Petrus
- 1,881
- 2
- 13
- 26
1
vote
2 answers
Advantages and Disadvantages Between Arrays and Maps for Component-Based Game Objects
My abstract implementation for a GameObject for my components-based game engine is the following:
GameObject
Unique ID
isActive flag
Array of components
I have been reading about component-based design, and one thing that caught my attention is…

lambda
- 1,225
- 2
- 14
- 40