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 ...
0
votes
0answers
12 views
Data storage in game objects [migrated]
I'm building a game with XNA at the moment, and I currently have my game object components set up like so:
class Character : GameComponent
{
public int health, state;
public float speed;
}
etc.
...
1
vote
1answer
57 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 ...
1
vote
1answer
67 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
239 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 ...
1
vote
1answer
100 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 ...
1
vote
1answer
97 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
238 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 ...
0
votes
0answers
148 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
225 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
2answers
392 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 ...
2
votes
1answer
147 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
239 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
144 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
459 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 ...
7
votes
1answer
454 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 ...
1
vote
1answer
437 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
1answer
133 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 ...
1
vote
1answer
246 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 ...
6
votes
1answer
390 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 ...
3
votes
2answers
232 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, ...
5
votes
2answers
260 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 ...
1
vote
1answer
220 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 ...
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 ...
1
vote
2answers
568 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
1answer
293 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. ...
3
votes
1answer
175 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 ...
5
votes
3answers
262 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 ...
0
votes
3answers
409 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 ...
6
votes
3answers
1k 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 ...
0
votes
0answers
311 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
270 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
278 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
1answer
773 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 ...
1
vote
2answers
414 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 ...
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 ...
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 ...
5
votes
1answer
266 views
Design to handle logic within a state
I am designing a new game and I am trying out the entity-component design where entities are comprised of groups of components holding a bunch of attributes. I also have a stack of 'game states' and ...
1
vote
1answer
193 views
A.I. dependencies based on components
I'm working on a turn based game in Unity. I need to perform field/grid analysis(2D grid) when i'm iterating trough each unit "entity". The A.I. should be able to plan ahead and therefor needs to ...
0
votes
0answers
86 views
Cocos2d/Box2d Component based entity system
Recently I've read somewhere that it is not a good idea to inherit from CCSprite class when making your game objects. In my CBES each Game Object has :
-PhysicsComponent(responsible for updating ...
5
votes
0answers
269 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 ...
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 ...
0
votes
1answer
344 views
C++ formatted serialization [closed]
I've decided it's time to implement serialization in my simple engine but this has caused me many headaches for the past couple of days/weeks. My engine uses an entity/component based approach similar ...
5
votes
1answer
490 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 ...
6
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 ...
6
votes
2answers
762 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 ...
2
votes
2answers
342 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 ...
4
votes
2answers
398 views
Game state management: the buck doesn't stop “here” soon enough
I realize there are already many Q&As on this site about GameState/GameScreen management, state machines, state stacks, etc. This question is meant as a follow-up:
Suppose hypothetically 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 ...
1
vote
1answer
250 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 ...
2
votes
4answers
619 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 *= ...