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

3
votes
1answer
355 views

Component-based object, traversal?

I'm working on a small C++ component based game engine, as such... Object Foo might extend GameObject and x number of component interfaces, like Renderable and/or Physical. So let's assume that Foo ...
3
votes
4answers
260 views

Reusing entities across screens: game data vs. object modelling

I'm working on a 2D RPG. I currently have a MainWorldScreen which has a Player entity, and some MapObjects that he can collide against. The player has a few components (sprite, keyboard input) etc. ...
3
votes
3answers
628 views

Why large builder classes rather than separate clases in component-based entity systems?

I was reading about component-based entity systems and I was wondering why there is usually a large EntityBuilder class with methods like CreatePlayer(), CreateEnemySpaceship(), and CreatePowerup(), ...
3
votes
1answer
177 views

Handling actions in component based multiplayer game

Please stay with me as I explain my question. I'm creating a multiplayer game. My design pattern follows broadly thoughts described in the post here. The idea is that each actor whether be it a ...
3
votes
2answers
515 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 ...
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 ...
3
votes
0answers
282 views

Suitable in memory storage library to store components for entity systems [closed]

I am studying entity indexed components and came up with a naive C++ implementation which just iterates over all entity "hash tables" and applies update/delete/insert functions in place. I'm having ...
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 ...
2
votes
3answers
699 views

Alternatives to Component Based Architecture?

Usually when I develop a game I will use an architecture like what you see below. What other architectures are popular for simple game development? I'm concerned about having a narrow view of what ...
2
votes
7answers
599 views

is ECS a kind of (or vs) OOP?

Is Entity Component System (ECS) considered a part of OOP or is it a completely different concept?
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 ...
2
votes
1answer
425 views

Is my engine concept a good one?

I'm currently writing a generic engine for my incoming games. I have developed few games already but never with the same "base" and my code was/is quite a mess. The idea was to create an engine that I ...
2
votes
2answers
343 views

How would the entity system handle dependent components?

Currently, I am still learning about entity-component-system, and I have the following question concerning the components. How would the systems handle dependent components? For example, In a 2D ...
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 ...
2
votes
2answers
820 views

How do I deal with abstracting collision handling code between entities with differing collision components?

I'm using a component based entity design with Components that hold the data and Systems that act on entities based on the components they have. Entities are registered to all systems as they are ...
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
2answers
238 views

How can I store a set of concrete components and implement “GetComponent<T>()?”

I would like an abstract class, AbstractComponentAggregate, which has many AbstractComponents. Users of my framework will create their components by extending AbstractComponent and appending the ...
2
votes
4answers
636 views

How can I have parent-child transform in a component system?

Before when using inheritance, I could draw all my objects using this recursive function: void Object::innerDraw(sf::RenderTarget& target, sf::RenderStates states) { states.transform *= ...
2
votes
1answer
149 views

Making more complicated systems(entity-component-system model question)

I'm using a model where entities are collections of components and components are just data. All the logic goes into systems which operate on components. Making basic systems(for Rendering and ...
2
votes
2answers
331 views

How to prioritize related game entity components?

I want to make a game where you have to run over a bunch of zombies with your car. When moving around, the zombies have a few things to take into consideration: When there's no player around they ...
2
votes
2answers
1k views

Dealing with 2D pixel shaders and SpriteBatches in XNA 4.0 component-object game engine?

I've got a bit of experience with shaders in general, having implemented a couple, very simple, 3D fragment and vertex shaders in OpenGL/WebGL in the past. Currently, I'm working on a 2D game engine ...
2
votes
1answer
348 views

How do i make player input object spawning data driven?

I'm using component based design and am at the stage or re-factoring simple player input to be data driven. Currently i have a PlayerControlComponent, which an entity has if it should be player ...
2
votes
2answers
2k views

Cocos2d Composition using CCSpriteBatchNode

I'm making a game in objective-c using cocos2d. I have the following: @interface Player : CCNode { CCSprite *mySprite; CCSpriteBatchNode *sceneSpriteBatchNode; //... } @property ...
2
votes
3answers
432 views

Need some advice on designing components

So after reading about components for a bit I want to make a very simple spaceshooter game that uses components and systems. However, I'm a bit confused on how much scope each component should have. ...
2
votes
2answers
232 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 ...
2
votes
1answer
175 views

Component-based programming with child objects

I am presently working on a game in Unity3d and have come to a cross road regarding scripting for repetitive child objects. Should these child objects handle its own scripting for best practice? For ...
2
votes
1answer
280 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 ...
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 ...
2
votes
1answer
360 views

Attributes and Behaviours in game object design

Recently I have read interesting slides about game object design written by Marcin Chady Theory and Practice of the Game Object Component Architecture. I have prototyped quick sample that utilize all ...
2
votes
1answer
124 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 ...
2
votes
1answer
134 views

Registering and (more importantly) Unregistering with Message Server

I've finally implemented an extendable message class and messageServer class. The message class dynamically assigns a unique static ID to each derived message type (ex. ObjectCreatedMessage might be ...
2
votes
0answers
50 views

User interaction and Component based architecture [duplicate]

I'm working at my first game and I've decided to build a simple component based engine. I found really useful to work in that way but I still miss some fundamentals probably. Let say that I have a ...
2
votes
1answer
283 views

Handling game logic events by behavior components

My question continues on topic discussed here I have tried implementing attribute/behavior design and here is a quick example demonstrating the issue. class HealthAttribute : public ActorAttribute { ...
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 ...
1
vote
3answers
1k views

XNA Entity Component Design: Lost on how to include Sprite Animation

I've been reading about Entity Component design and thought it's pretty neat. I've been trying to write a quick 2D engine in XNA. I think I've laid the proper groundwork for registering and updating ...
1
vote
1answer
395 views

Game-components and memory management

I'm stitching together the workings of a component based game engine, and as such have been deeply reading into many aspects of both game engine architecture and a fair amount of opinionated theory of ...
1
vote
2answers
216 views

Searching a map fewer times

... or better yet, removing the need to search the map altogether. I'm either looking for suggestions on how to optimize my code, or a change in design. In my component-based entity system, the ...
1
vote
1answer
1k views

Some practical issues with component-based game object systems

I am creating my own game engine just for fun and brain development. I have chosen various free and open-source libraries to integrate and now I have come to the engine architecture. I intend to use ...
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
2answers
600 views

Entity system game design and input handler

I have started create a lightweight game engine with Ogre and C++. I have a abstract component class and an abstract entity class. #ifndef ENTITY_HPP_ #define ENTITY_HPP_ #include <string> ...
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
1answer
147 views

Increasing flexibility of a data passing system in a component based entity system

I'm creating a Component orientated system for a small game I'm developing. The basic structure is as follows: Every object in the game is composed of a "GameEntity"; a container holding a vector of ...
1
vote
5answers
2k views

Need opinions: is it worth making component based entity system? [closed]

I've been reading about component based entity-system for couple days now and I'm not quite sure if it is worth implementing in my next game. I haven't started making the game yet, but I have bunch of ...
1
vote
2answers
407 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 ...
1
vote
1answer
145 views

Dealing with sprite loading and setting in an entity-component system

I've just started using an entity-component system for the first time and I'm having trouble making some decisions. Currently I've got a SpriteComponent that holds a sprite, a ...
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 ...
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. ...
1
vote
1answer
442 views

component Initialization in component-based game architectures

I'm develping a 2d game (in XNA) and i've gone slightly towards a component-based approach, where i have a main game object (container) that holds different components. When implementing the needed ...
1
vote
1answer
340 views

Implicity of “Objects” in component based design

For a while, I have mostly been using "standard OOP" (inheritance heavy, tree structure, etc.) styled designs for my Game Development needs. However, for my current project I am trying to shift over ...
1
vote
1answer
322 views

Component Based Design DLL

I'm undecided on a design decision. Now for my game I was thinking on splitting components into separate dlls. This would allow for a more modular approach, especially when in need of updates. On ...