Tagged Questions
1
vote
1answer
123 views
How do I implement space partitioning in entity component system?
My systems work on components without needing to now anything about entities. I want to implement simple grid partitioning, so each entity will be given a cell based on its current position. But how ...
3
votes
1answer
219 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
2answers
129 views
Should widgets be part of a scene in a 2D game?
I'm in the middle of separating logic and drawing of a 2D game, i.e. I'm moving from scenes/entities that draw themselves to scenes/entities that merely store and update data, getting drawn by a ...
0
votes
1answer
313 views
How to use Bullet physics with Entity Component Systems?
I have an Entity Component system and I want to have a Physics Component that would add the given object to the physics simulation.
My problem arises because the Bullet API requires me to add each ...
7
votes
1answer
761 views
How to benefit from cpu cache in a entity component system game engine?
I often read in the ECS game engine documentations that is a good architecture for using cpu cache wisely.
But I can't figure how we can benefit from cpu cache.
If components are saved in an array ...
3
votes
1answer
200 views
Entity component systems and DDD: violation of encapsulation?
I'm using a hybrid of DDD (domain-driven development) and an entity-component system. That is to say:
I have an Entity class with a list of Components, and the ability to add/remove/get components
I ...
2
votes
2answers
227 views
In a ES system, how one would implement/ deal with Modifiers?
Given the normal entity-component-system architecture, lets say we a component that give the entity Strength. Now on the game flow I want to give +4 strength do to the wielded weapon.
What would be ...
2
votes
1answer
635 views
Using an Entity System Architecture with Task Based Parallelism
Background
I have been working on creating a multithreaded game engine in my spare time and I currently trying to decide the best way to work an entity sytem into what I have already created. So far, ...
5
votes
3answers
693 views
When two moving objects collide, which one sends the message, and which one recieves it?
I am writing a platform game using an entity-component system. Entity-World collisions are robust and work very well, and I'm now working on collisions between entities.
Just to be clear, in my code ...
2
votes
2answers
269 views
Confusion about systems implementation of ECS
For reference I am mostly imitating the architecture in this tutorial, the "Entity System" section: http://www.raywenderlich.com/24878/introduction-to-component-based-architecture-in-games
NOTE: the ...
1
vote
1answer
256 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
129 views
Timestamps as ids in an entity manager?
I've built my own entity manager, as I found out some days ago, it is very similar to the Artemis framework.
For now, I just use integers as entity ids. Behind the scenes, there is a simple integer ...
5
votes
3answers
266 views
Mismatch of Entity System and Savegames
There is a theoretical mismatch of the entity system and the savegame system, which is think is common, but I haven't found resources about that. Therefore I will explain both systems first, as short ...
1
vote
1answer
733 views
Entity-System Architecture; Pools and Factories
I'm creating a 2D game based on entity-system architecture using C++, the C++ port of Artemis, and SFML. I've had to jump through a few hoops, but it's been fairly smooth until now.
In this game, I ...
1
vote
1answer
141 views
Positioning sprites in a Component-Entity engine
I'm building my first component/entity engine and I'm not so sure about some of my choices. I'm here asking suggestions on my first doubt.
I draw objects with 2 different behaviours:
1) Position ...
1
vote
4answers
2k views
Entity System creating Components
Over every entity system I see implemented in C++, or even in Java/C# (e.g. the Artemis framework). I see components not allocated via a new operator (or something similar, e.g. std::make_shared). For ...
8
votes
3answers
711 views
Grouping entities of the same component template to linear containers
EDIT: Looks like people are actually doing this!
http://www.randygaul.net/2013/05/20/component-based-engine-design/
Another example of using this data accesing pattern.
I've done a lot of research ...
4
votes
2answers
943 views
Allocating Entities within an Entity System
I'm quite unsure how I should allocate/resemble my entities within my entity system. I have various options, but most of them seem to have cons associated with them. In all cases entities are ...
0
votes
3answers
494 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 ...
3
votes
1answer
740 views
Movement & Physics in an entity-component system
I'm currently playing around with entity-components systems and got started on the movement/collision/physics parts and would like to have some pointers!
It's a basic 2D sidescrolling game, with the ...
2
votes
1answer
266 views
Where to put common System functionality in Entity-System Design?
I am working on an Entity System design based largely off of Adam Martin's design and Ray Wenderlich's Objective-C Implementation.
I am working on the AI system using a state machine with a System ...
1
vote
0answers
108 views
Events with Entity Component Systems [duplicate]
I'm currently working on an HTML5 top-down simple RPG game, and as a learning experience I'm building my own little engine from scratch. After reading around a little I decided to go with the Entity ...
2
votes
1answer
292 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
906 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 ...
0
votes
2answers
303 views
Attribute ownership in Entity Component systems
How do you typically handle data ownership in these systems?
Right now I just have a map that maps type(std::string or hashed int)->void* where outside sources can add attributes via a simple ...
1
vote
1answer
278 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 ...
7
votes
2answers
3k views
Tips for Component Based Entity System message handling
I'm trying to implement a component-based entity system but am a bit confused on how I should handle the messaging. There are two problems I'd like to resolve so I can test the system. Below is the ...
2
votes
2answers
630 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
3answers
537 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 ...
4
votes
2answers
711 views
Where to generate data in an Entity-Component System?
So I'm making a small game where I generate 2D landscape using perlin noise when the game first loads.
I've got it working in a OO way, but want to move over to an ES architecure, and I'm just ...
2
votes
3answers
899 views
Question on the implementation of my Entity System
I am currently creating an Entity System, in C++, it is almost completed (I have all the code there, I just have to add a few things and test it). The only thing is, I can't figure out how to ...
3
votes
3answers
1k views
SceneManagers as systems in entity system or as a core class used by a system?
It seems entity systems are really popular here. Links posted by other users convinced me of the power of such system and I decided to try it. (Well, that and my original code getting messy)
In my ...
8
votes
2answers
593 views
Many sources of movement in an entity system
I'm fairly new to the idea of entity systems, having read a bunch of stuff (most usefully, this great blog and this answer).
Though I'm having a little trouble understanding how something as simple ...
1
vote
1answer
458 views
Is component-based design an architectural pattern or design pattern?
When using the component-based paradigm in game development with engines like Unity, is component-based design an architectural pattern, or a design pattern?
Can I even say that component-based ...
6
votes
4answers
2k views
Entity System and rendering
Okey, what I know so far;
The entity contains a component(data-storage) which holds information like;
- Texture/sprite
- Shader
- etc
And then I have a renderer system which draws all this. But ...
11
votes
3answers
1k views
How to code UI / HUD in Entity System?
I think I already got the idea of the Entity System inspired by Adam Martin (t-machine). I want to start using this for my next project.
I already know the basic of Entity, Components, and Systems. ...
3
votes
2answers
558 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 ...
2
votes
3answers
2k views
Entity System with C++
I'm working on a game engine using the Entity System and I have some questions.
How I see Entity System :
Components : A class with attributs, set and get.
Sprite
Physicbody
SpaceShip
...
System ...
91
votes
1answer
14k views
Role of systems in entity systems architecture
I've been reading a lot about entity components and systems and have thought that the idea of an entity just being an ID is quite interesting.
However I don't know how this completely works with the ...
7
votes
2answers
3k views
How to structure game states in an entity/component-based system
I'm making a game designed with the entity-component paradigm that uses systems to communicate between components as explained here. I've reached the point in my development that I need to add game ...
4
votes
1answer
1k views
In a component/entity system, what's the correct way to implement entity-specific components?
I'm trying to create a basic C/E game engine for Android, and I'm trying to re-create pong as a basic warm-up. I currently have a EntityManager class that contains a list of all the UUIDs for its ...
7
votes
2answers
2k views
Book about Entity System?
I'm really interested about the capabilities of Entity System. I'm trying to search for a good book on this one, but failed.
I don't want to get lost on learning this paradigm so a book will be a big ...
5
votes
1answer
866 views
What are the drawbacks of this messaging system implementation?
So I've just been thinking about component and messaging systems recently for simple C# XNA games and came up with this. How extensible would this implementation be and what are the drawbacks? Example ...
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 ...
8
votes
1answer
763 views
Processing component pools problem - Entity Subsystem
Architecture description
I'm creating (designing) an entity system and I ran into many problems. I'm trying to keep it Data-Oriented and efficient as much as possible. My components are POD ...
1
vote
2answers
537 views
Entity manager loop opinions
This days I'm refactoring code and one of the things I want to improve is my entity manager code. More precisely, the update funcion where entities are updated. My engine is a 2D tile based engine ...
2
votes
3answers
1k views
Question about “Entity System” design
I am developing a top down 'thing' in SFML and C++ and was wondering about how best to handle so called Entities in my game.
An entity, for example is defined by me as an object in-game, such as a ...
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 ...
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 ...