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

-1
votes
0answers
10 views

How do I implement and structure a component based approach for game objects

So I am fairly new to game design (I made this ) and very new to coding in c++, and am attempting to make a game with c++ and SFML. Right now I have a very simple game, where a rectangle jumps around ...
1
vote
1answer
115 views

Entity Component System Coupling

Lately I've been working on a small personal project which is basically an Entity Component System framework with autoupdated Systems. While I have a pretty good idea on the way the framework should ...
-1
votes
0answers
46 views

I'm developing a Component-Entity game engine and could use some guidance/opinions on design [on hold]

After writing this... it's a bit of me thinking out loud, so I know it's a poor question, but I'm struggling with anxiety, and being uncertain about how to do things puts a lot of strain on me, often ...
1
vote
1answer
117 views

Using unordered_multimap as entity and component storage

The Setup I've made a few games (more like animations) using the Object Oriented method with base classes for objects that extend them, and objects that extend those, and found I couldn't wrap my ...
1
vote
1answer
47 views

How can I resolve component types in a way that supports adding new types relatively easily?

I am trying to build an Entity Component System for an interactive application developed using C++ and OpenGL. My question is quite simple. In my GameObject class I have a collection of Components. I ...
2
votes
1answer
110 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 ...
1
vote
1answer
55 views

Implementig State-driven agents in an Entity-Component-System

A state-driven agent is an agent that performs an action based on its current state. The logic can be implemented through the use of a D-FSM that changes state depending on the Agent's "perception" ...
3
votes
1answer
285 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 ...
0
votes
2answers
83 views

Data oriented design vs visibility

I'm almost sold on the concept of a data oriented engine -- however, one thing still eludes me. If we pack the data from a large level into huge arrays and go over them, any visibility system that we ...
2
votes
1answer
127 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
7answers
753 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
2answers
227 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 ...
0
votes
1answer
57 views

Adding Components (classes) to unordered_map in Entity? (Possible typeid as key issue)

I've got a little test put together that has a couple simple Components that are supposed to be added to an Entity, but the addComponent function isn't working; I think it's got something to do with ...
0
votes
2answers
174 views

Component based architecture: “pure” or some inheritance?

(I asked a similar question, but it had more questions inside it and I feel it wasn't clear enough, so I'm opening a new one). Until recently I implemented all my games using an inheritance ...
9
votes
2answers
754 views

Entity/Component System and UI “Entities”

I'm still green to entity/component systems. I find that since I have useful components for drawing sprites (or spritesheets) and handling input (mouse/touch clicks), I naturally want to reuse these ...
2
votes
1answer
123 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 ...
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 ...
1
vote
1answer
85 views

Passing a list of existing entities to a new client when using a component system?

My game server uses entities containing components to represent everything in the game world. This has worked great so far but I've run into a problem now that I'm allowing clients to connect to the ...
4
votes
5answers
392 views

How can I efficiently implement a bitmask larger than 64-bits for component existence checks?

In my ECS implementation, I use bit-wise operations (as described and illustrated in this thread) to tell an entity what type of components it currently consists of. So my Entity class has the ...
6
votes
3answers
2k views

How to avoid “Blob-Systems” in an entity component system?

Currently I am facing the following problem: I am trying to write a pong clone by using an entity component system (ECS). I wrote the "framework" all by myself. So there is a class which manages ...
5
votes
2answers
341 views

How to model interentity membership in entity-component architecture?

I'm falling in love with simple grace of entity-component design, although I still have issues breaking from MVC and OOP practices. Some of my game entities have membership relationships with each ...
1
vote
2answers
561 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
144 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 ...
6
votes
2answers
291 views

Why are entities in a component system composed at run time?

Why are entity component systems the way they are? For example as far as I have seen it may look like this class Entity list of components add component remove component update ...
5
votes
1answer
603 views

Structuring server-side networking with entity-component systems

I've been working on an online game, and recently have been working on converting the base of the game to use the Artemis Entity System Framework. I'm having a bit of difficulty conceptualizing ...
20
votes
5answers
5k 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 ...
0
votes
0answers
172 views

Component Based Entity Design how to handle rendering in tiles

I am testing Component Based Entity System for a text based RPG game (I want to convert it to 2D in the future. this might sound crazy idea but the purpose of this forum isn't about that :) ). I have ...
2
votes
2answers
292 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 ...
1
vote
1answer
263 views

Need opinions on my component based design [closed]

I have an Entity class and a Component class. The Entity class has a list of attached components, and each component also has a member variable that is a reference to the entity that it is attached to ...
2
votes
1answer
211 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 ...
4
votes
1answer
289 views

Separating components and logic

I've been working on how to build some of my game systems using components and systems. I'm having a little trouble following the approach that components should just be bags of data and systems ...
1
vote
1answer
156 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 ...
0
votes
3answers
866 views

how to add different class items to the same list C# XNA

I am trying to make a modular ship system, where parts can be added or removed to the ship entity. I am using a class I made called ModuleManager and it has a list of ShipModules. this works fine for ...
2
votes
1answer
155 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
1answer
682 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 ...
6
votes
1answer
489 views

How would one store global context data in an entity component system?

My question is this: How would one store global context data, ie. world data information, current world time, etc in an entity component system? I'm think of working towards building a Dwarf ...
1
vote
1answer
335 views

AI of Turn Based game using Entity System approach

I just recently learned about Entity Systems and want to try it out on a real example (I was developing a game recently and want to try to port it over Entity Systems). But I got problem right away. ...
1
vote
2answers
906 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> ...
3
votes
2answers
256 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, ...
6
votes
2answers
288 views

Where to put Entity Death Events in a Component/System Design

Entities in my game are nothing more than a collection of components, tied together with an entityID. I have (near) data-only components, and systems that work on the data. One of these components is ...
2
votes
1answer
192 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 ...
1
vote
1answer
229 views

Should I use an abstract class or function pointer to implement component notifications?

I want to create a component-based game engine with subsystems which do the work, entities which are simply a list of components (plus position and rotation, because every object will have that), and ...
5
votes
3answers
295 views

How can I achieve strong typing with a component messaging system?

I'm looking at implementing a messaging system in my entity component system. I've deduced that I can use an event / queue for passing messages, but right now, I just use a generic object and cast out ...
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 ...
3
votes
1answer
215 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 ...
0
votes
3answers
544 views

Rendering order in an Entity System

Say I use a basic ES approach, and also inside Systems I hold lists of all entities that Systems are required to process. How do I maintain this list of entities in desired rendering order, i.e. for ...
21
votes
3answers
5k 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 ...
0
votes
0answers
497 views

Component based architecture - Rendering approach?

I'm planning to use a component based architecture for a new 3D game engine I plan to work on, however I don't know how to approach the rendering side of things. I can see two options here: Every ...
2
votes
1answer
335 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
305 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 ...