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
2answers
269 views

Target a specific Entity in a Component-Entity design

I'm starting to work on a game with Entity-Component Model Architecture (Artemis in C#). I'm beginning with something pretty simple, entities which are living things, with HealthComponent, ...
3
votes
2answers
704 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, ...
3
votes
1answer
423 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
277 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
682 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
238 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
631 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
142 views

Trouble Using Component Base Pattern

I am trying to use a component based pattern on my new project. The last projects I did the old fashioned way. Base class and derive from that until your brain hurts. This time I wanted to do it on a ...
3
votes
1answer
838 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
299 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
7answers
874 views

is ECS a kind of (or vs) OOP? [closed]

Is Entity Component System (ECS) considered a part of OOP or is it a completely different concept?
2
votes
3answers
948 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
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 ...
2
votes
2answers
388 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
2answers
707 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
457 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
269 views

What are the advantages of having component logic in a “system” versus the component itself?

For the past few days I've been trying to make my first game. I did some research on usual development practices and patterns and I settled on a composition system where the different components ...
2
votes
3answers
637 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
895 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
334 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
244 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
1answer
169 views

How should an object that uses composition set its composed components?

After struggling with various problems and reading up on component-based systems and reading Bob Nystrom's excellent book "Game Programming Patterns" and in particular the chapter on Components I ...
2
votes
1answer
868 views

Entity Component Systems, Input, and Angry Birds!

I am using Artemis ECS. I have the very basics of a game already. I am now trying to determine how to gracefully handle input and to a lesser extent collisions. Some people say with ECSs, everything ...
2
votes
4answers
908 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
228 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
348 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
2k 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
364 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
441 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
3answers
99 views

Building a C-E engine in a high level language, how can I integrate optional lower-level components that own overlapping state?

To clarify, by overlapping I do not mean overlapping between said components, but rather, let's say I have: My entity contains components, and a parent-children system. Call it a mandatory Hierarchy ...
2
votes
1answer
157 views

Viewing one of multiple worlds in a component entity system?

I've been working on a space simulation game. The player can control a ship and fly through wormholes to get from one solar system to another. I would like the player to be able to switch the camera ...
2
votes
2answers
345 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
209 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
376 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
1k 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
377 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
4answers
364 views

Executing Components in an Entity Component System

Ok so I am just starting to grasp the whole ECS paradigm right now and I need clarification on a few things. For the record, I am trying to develop a game using C++ and OpenGL and I'm relatively new ...
2
votes
1answer
185 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
338 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
3answers
115 views

How do I define a required component on a Unity game object?

I have a script that expected the game object to have a Terrain component. Is there an attribute I can add (or some other way) which will prevent a designer from adding my ...
1
vote
2answers
718 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
493 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
219 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
2answers
679 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
259 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
3answers
147 views

Responsibility of rendering in a component/entity game engine

I am developing a simple component/entity game engine in C# (https://github.com/alexvm/BlueShift) and have a few questions regarding the responsibility of certain items in the engine itself. I have ...