Skip to main content

Questions tagged [entity-component]

Filter by
Sorted by
Tagged with
0 votes
1 answer
3k views

I'm writing an entity component system and want to store each type of component separately and contiguously in memory in a way that's easy to iterate over. Component...
Accumulator's user avatar
2 votes
2 answers
4k views

I'm trying to figure out how to implement a simple ECS with an Archetype approach, similar to what Unity's ECS uses. An archetype is just a category for entities that have a specific set of components....
Floating Sunfish's user avatar
0 votes
1 answer
2k views

I'm just starting to implement my own ECS and am drawing everything down on paper to make sure I understand it all before tackling the implementation in code. However I'm getting stuck on entity-...
NeomerArcana's user avatar
0 votes
0 answers
79 views

I currently have a weapon component that contains common functionality across weapons (mainly guns). ...
user avatar
0 votes
1 answer
186 views

For reasons outside the scope of this question, my game has several full copies of the game environment running asynchronously. At any one time, only one of these is rendered. This is trivial to ...
Omegastick's user avatar
1 vote
1 answer
224 views

So I'm working on a game where squads of varied units would explore, fight, trade and build on an overworld map. Combat would be automated more or less, and happen on the overworld. Basically, ...
Hypergardens's user avatar
2 votes
0 answers
159 views

After having read some example programs (namely Pong, Snake and Pacman) I am now experiencing with ECS. I am wondering where to put the elements for a reward flow. Do you know good practices for ...
julien's user avatar
  • 121
0 votes
1 answer
62 views

http://t-machine.org/index.php/2015/06/09/entity-ids-how-big-using-uuids-or-not-why-etc/ I see this one article that proposes specific IDs just for the networking side of the game. If you are already ...
GuestPosterStrikesAgain's user avatar
5 votes
1 answer
5k views

Preamble: I'm working on a level editor for my engine, which uses an ECS architecture. I have around a dozen component types so far, mostly dealing with graphics, like lighting components, model, and ...
Yattabyte's user avatar
  • 1,043
2 votes
1 answer
651 views

In the game I have, I'm using an architecture close to what I've seen of Unity components : Basically, the universe implements the game loop, entities implement and ...
user avatar
0 votes
0 answers
109 views

When i create a component in Sketchup and i export it to Unity, the component structure is always: Component_Name MeshX How can i avoid having the component name as an empty parent and just set it ...
FrakyDale's user avatar
  • 111
1 vote
1 answer
354 views

We've built an entity-component architecture that works ok for our needs, but it has something that bugs me a bit from a software engineering point of view. We use ...
Vaillancourt's user avatar
  • 16.4k
0 votes
2 answers
2k views

I'm restructuring my model of entities, components and systems, where entities are: ...
PerduGames's user avatar
4 votes
2 answers
1k views

Recently I've been throwing problems at Entity Component Systems to see how far I can push the paradigm. One problem in particular I struggle with, which is writing an elegant implementation of the n-...
Sander Mertens's user avatar
2 votes
1 answer
374 views

I'm writing a SpriteKit game in swift and making use of GameplayKit's entity-component system. There are many components that do different stuff but share the same methods in which they do it, so I ...
lsauceda's user avatar
  • 151
0 votes
2 answers
277 views

I am new to game development. Coming across the ECS (entity-component system) pattern I generally quite liked the idea. I have implemented the current version of my engine using the OOP style approach....
Adrian Albert Koch's user avatar
0 votes
2 answers
1k views

So, I'm new to ECS. The concept is very interesting in contrast to traditional OOP and heavy inheritance. I'm working on a game right now that is open-sourced, but does not actually have a game loop. ...
Jon Nguyen's user avatar
3 votes
2 answers
985 views

I'm new to Entitas. I have a DamageSystem that should Physics.Raycast() toward the target and if tag is enemy it should reduce ...
lazarevsky's user avatar
4 votes
2 answers
2k views

The intro to this problem is a bit of a long one so my apologies in advance. In short I am asking for suggestion as to what type of collection I should use to store data for a particular part of my ...
Ryoku's user avatar
  • 187
0 votes
1 answer
2k views

I am trying to use an ECS for my 2d game at the moment. Up until now I had my world subdivided into chunks (as minecraft does) of size 64x64. They are loaded and drawn when they come onto screen. I ...
fubal's user avatar
  • 101
0 votes
2 answers
759 views

I've read some articles about Entity Component System and I like this idea of "entities" having lots of "components" to define them, so I tried to implement it. Here is an simple overview of what i've ...
Vadimz's user avatar
  • 158
0 votes
1 answer
828 views

I'm developing a top-down shooter in C++ using an entity-component system, and have run into a problem when attempting to refactor powerups. Currently I have a ...
Rich. T.'s user avatar
3 votes
2 answers
2k views

I have been trying to wrap my head around how ECS works when there are components which are shared or dependent. I've read numerous articles on ECS and can't seem to find a definitive answer to this. ...
Driv's user avatar
  • 43
1 vote
1 answer
2k views

I'm new to ECS concept and trying to refactor my app with an ECS manner. After reading some articles, I still don't get a sense about how to organize hierarchy for such pattern. My questions are Is a ...
Lin M's user avatar
  • 11
0 votes
1 answer
493 views

I'm working on a 3d grid based game, and I am trying to implement it using an ECS. I have a position component which indicates the entity's position on the grid. It is comprised of 3 integers (for ...
user92748's user avatar
3 votes
2 answers
2k views

If I knew all of the systems at compile time, I could order them myself. However, I intend on having user-defined mods. This adds a level of complexity, in that I (as the framework developer) don't ...
Zymus's user avatar
  • 131
0 votes
2 answers
2k views

I've been using the ECS pattern for a while now and, as the complexity of the game increased, I started having issues with the timing of the entity initialisation and destruction code. I'll use the ...
loodakrawa's user avatar
0 votes
1 answer
121 views

Background: So I'm developing my first 2d C++ fighting game (for learning purposes) and I have a setup where I have 'components' which are really just data holders with maybe some simple utility ...
Jason's user avatar
  • 423
1 vote
2 answers
359 views

Currently I'm working with LibGDX and using Ashley for ECS. Everything is fine, until i need to remove groups of related components. Say we have a player that may use different weapons. For now, in ...
lowercase93's user avatar
6 votes
2 answers
5k views

I'm planning to develop a game in C# (but I don't think that language matters) and I'll be using Entity Component System since I know by design that my game will have a lot of different game items ...
Andrew's user avatar
  • 111
1 vote
1 answer
884 views

I'm developing a game using an entity-component system, and had a question about storing, using and linking textures to entities. I have a GraphicsSystem that is ...
Rich. T.'s user avatar
1 vote
0 answers
204 views

I am currently coding my own ECS to get a deeper understanding of how such an engine works. I am currently putting together systems. I am aware that there is no right answer to my question as there ...
Martin Sand's user avatar
1 vote
2 answers
3k views

I am implementing an entity-component system. Below is my current implementation in c++. ...
Lesley Lai's user avatar
2 votes
1 answer
801 views

I'm doing a game using Phaser with TypeScript. I want to implement a component based architecture for Actors. What I'm trying to achieve is this: ...
Guilherme Recchi Cardozo's user avatar
7 votes
2 answers
15k views

I want to ask if the following is an effective way to architect event propagation using an ECS? Here is a hypothetical collision scenario using an ECS. Components: ...
Danny Yaroslavski's user avatar
1 vote
2 answers
2k views

I see all the upside in entities registering automatically for basic components. If an entity has a Renderable component, it should be registered to a list that's used by a Renderable System. If an ...
Danny Yaroslavski's user avatar
0 votes
0 answers
694 views

Say I have an entity that has these components: -Transformation -Visual Imagine that these components can nest: If I have a parent transformation component, a child transformation relies on the ...
Danny Yaroslavski's user avatar
3 votes
0 answers
870 views

Situation: I am working on an Entity-Component system, and I am using LuaBridge as a Lua binder. There is only one Lua State. Currently when I update the game objects, I just check whether it has a ...
Tudvari's user avatar
  • 801
5 votes
1 answer
1k views

Since the ECS follows the principle Composition over Inheritance, and it makes the behavior of game objects can be changed in the runtime. If ECS is a principle, from my memory of design patterns of ...
Niing's user avatar
  • 169
2 votes
1 answer
2k views

Reading up on ECS, I've tried to implement a simple 'game', if you can call it that. Basic concepts : You have planets(entity), they produce gold. (gold is a component inside planet) Planets can ...
Patrick's user avatar
  • 163
2 votes
2 answers
1k views

I'm developing a game in C++, making use of the Entity-Component system. I'm going to store a list of each component, with each component's position in the list mapping to it's entity. So, the 5th ...
Rich. T.'s user avatar
0 votes
1 answer
90 views

Let's say that I use a behaviour component that holds a function call to be called every update step assigned to an entity. Inside that function call I'm changing the active state for the entity to ...
FrameBuffer's user avatar
0 votes
1 answer
388 views

Im currently trying to setup my game and Ive started to implement input. It works like this: I have an Input class who notifies the ...
zebleckDAMM's user avatar
1 vote
1 answer
1k views

I am currently working on a game in Java that uses an entity component system. The game currently has two separate update() and ...
user avatar
0 votes
1 answer
243 views

I have been studying several entity component systems (Anax and EntityX) to get an idea of how they work. For Entity ids, both use 2 numbers. The first number is basically a position in an array, and ...
Ry Lowry's user avatar
  • 103
0 votes
1 answer
277 views

I have recently been programming an Entity Component System in Java for a small game that I am working on. From what I have tested, it works rather well however I question the component part. I ...
user avatar
2 votes
1 answer
1k views

My components are 100% isolated. No component knows about anything outside of itself in any way. Components have functions that operate on their internal state, and events to inform what's happening ...
user441521's user avatar
6 votes
2 answers
6k views

I'm working on an ECS and I've already read a lot of articles about it. Most of these articles are talking about a simple case (store data contiguously, read it in a single for loop). However the real ...
csisy's user avatar
  • 375
1 vote
2 answers
150 views

In my game I have a MoveComponent and a ClimbComponent. Some characters can only move around on one level, others are able to ...
Krumelur's user avatar
  • 299
0 votes
2 answers
886 views

I have some count of weapons - pistol, shotgun, rifle. And I have one system which deals with all weapons, and another system which deals only with pistol. So I need to create both components "weapons"...
saxartom's user avatar