Questions tagged [entity-component-system]

Used when referring to the Entity-Component-System (ECS) architecture.

Filter by
Sorted by
Tagged with
1
vote
0answers
22 views

Efficient communication between entities using ECS via entt

To avoid confusion about the ECS terms I'll use, I explain them here quickly. I use entt terminology and set-up my architecture like this: Entity: is only an id (...
1
vote
1answer
58 views

Is it useful to distinguish between two different kinds of events?

i have thought about this for a long time and i think i just going in circles. I need someone to tell me if im just simply overthinking it. So, first of all im coming from a 'classical' ECS approach: ...
0
votes
0answers
24 views

Should the HUD be Entites in a ECS ? And how to handle Events if so?

I'm building a GameEngine using Ashley and some how I can't figure out how. I through I could use something like this. Or use the Signal/Listener from Ashley. But how to Implement a interactive HUD?...
1
vote
2answers
95 views

ECS - Lantern implementation / How does the RenderSystem determine which one to choose? Entity-Datastructure

I want to implement ECS in my game. The more I read the more insecure I get. The current available Components for a Entity processed by the RenderSystem are: RenderComponent (mesh, texture, ...
0
votes
1answer
40 views

How do you handle entity life-time and entities without all components in an ECS?

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-...
0
votes
2answers
78 views

How does ECS handle systems which need to know more about the environment of the entities it processes?

I'm trying to wrap my head around the concept of ECS (Entity Component System). I think I grasp the concept of the different parts, Entities, Components, and Systems. Entities: Basically just a ...
0
votes
1answer
39 views

How to do you separate or do you separate a Player/Non Player movement, action, behavior states in one or more component?

Assume we are using Finite State Machine, what is the best way to organize states? Given I have current StateComponent, all states are here. ...
0
votes
0answers
26 views

Return different components by name in entity component system

I'm working on an entity component system but I'm having trouble with the editor. Components take the form of structs with this formula Component healthComponent; This works fine when you know what ...
1
vote
1answer
180 views

Using EntityManager from inside a system

I am using Entities v0.8 I am trying to build a Spawner, and this is the system ...
1
vote
1answer
94 views

ECS as part of the rendering pipeline of an engine

I'm trying to integrate ECS design into my game engine. Currently I'm trying to mimic the components of unity (although not pure ECS) with MeshFilter (holds ...
0
votes
0answers
63 views

Scale / NonUniformScale is not applied to entity

I'm just learning the new Unity ecs and trying to change the size (scale) of an entity. Everything works fine, I can change the rotation, the position but not the scale. I'm wondering why. I did ...
3
votes
0answers
243 views

Is ECS an object-oriented design in disguise? (rather philosophical/technical)

Correct me if I'm wrong, but having read a lot about the ECS-Pattern in general and in the context of current game engines I am beginning to wonder if the ECS-Pattern in it's core is hardly more than ...
0
votes
0answers
96 views

Unity ECS burst compiler error “Cannot find the field TypeInfos”

I'm getting this weird error messages whenever I start my game. I can't find out why I get this message below. Library\PackageCache\com.unity.entities@0.5.1-preview.11\Unity.Entities\Types\...
0
votes
1answer
792 views

How to make animation in unity Dots hybrid?

I'm working on isometric game in 2D but didn't find any good tutorial in how to handle animation...any help?
1
vote
0answers
62 views

How do set a layer on an ECS entity?

I'm using Unity ECS entities to draw out some tiles. I would like to determine the layer (or sortOrder) of the rendered tile so that if a tile is placed over another at the same position, the tile ...
0
votes
0answers
104 views

How to sync entities in an ECS game?

I'm wondering how to engineer a client server sync of entities in a multiplayer game which is using an ECS. When the server changes some values of the components of an entity, I thought the best ...
4
votes
2answers
770 views

What is a pure ECS?

What is a "pure" ECS? What makes an ECS pure or not? Although the term appears to have come up since as early as 2013 in this community, it appears that often, a user asking a question feels the need ...
0
votes
0answers
38 views

Entity Component System. System and managed / filtered entities storage

Recently, I have been working on my own implementation of an ECS. One of the decisions I made was to make systems store a contiguous vector with all the entities that the system would work on (for ...
1
vote
0answers
40 views

How to find and modify specific entity or gameobject in Hybrid ECS?

I am rotating 3 cubes in Unity with Hybrid ECS and the code goes like this : ...
2
votes
1answer
251 views

Tilemap collision in Pure ECS?

I'm currently making a 2D topdown dungeon crawler using pure ECS and Data Oriented Design. So I only use structs of arrays for all my components. I have now added tilemap generation, but was wondering ...
0
votes
0answers
32 views

How to execute something on a main thread in ECS?

I have a game in which I have 5000 spheres on the scene simultanously. I needed the spheres to check for collisions with player's mouse, so it looks like the player is removing the balls with his ...
0
votes
1answer
83 views

Hidden copies of the environment in an entity component system

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 ...
3
votes
2answers
186 views

How do I build the dependency graph on ECS?

ECS is excellent at decoupling: you split your game logic into multiple pieces, and every system is responsible for dealing with a specific piece. However, I don't know if each system should be aware ...
1
vote
1answer
71 views

Should fields in components in an ECS use polymorphism?

I've just started to try and learn how to use ECS (Entity component systems), but I'm having trouble understanding the concepts behind components. Should adding more types of components, or trying to ...
1
vote
1answer
742 views

IConvertGameObjectToEntity interface on Unity ECS

Was working on ECS and following the tutorials by Mike Geig in Unite Copenhagen on YouTube(https://youtu.be/BNMrevfB6Q0), and understood that unity automatically converts transforms, mesh renderers ...
1
vote
1answer
1k views

Unity conversion of Gameobjects to ECS

I have not worked with ECS before, so I was following the tutorial by Unity's Mike Geig on Youtube to convert gameObjects to ECS from Unite Copenhagen, and this code does nothing, and there are no ...
5
votes
1answer
355 views

How can I create a templated function to add components to their necessary containers using an ECS system?

I had implemented a basic ECS system and was then informed that it should be changed as each system should not directly store their required components. I have created a ...
1
vote
1answer
105 views

Where should I put units and items in a squad-combat ECS-based game?

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, ...
2
votes
0answers
66 views

Properway to pass information from one system to another in an entity component system design

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 ...
0
votes
1answer
47 views

Reading and writing components from multiple systems in ECS [duplicate]

As a learning exercise, I'm building my own ECS. I've got a situation where two separate systems want to query and possibly update a Transform component - input ...
5
votes
2answers
704 views

Entity Component System: where do I put containers?

I'm pretty new when it comes to the whole Entity Component System structure and I got some questions I just can't wrap my head around. I know that for example collisions, you'd have a ...
3
votes
1answer
703 views

Dealing with more complex entities in an ECS architecture

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 ...
0
votes
1answer
101 views

How to handle dynamic hierarchical entities in ECS

Here's the analogy: I have an organism which is composed of cells which can be further composed of a medley of attachments. What I have currently is a sort of event chain between child/parents to ...
3
votes
2answers
2k views

Fastest way to look up an entity with a set of components?

I'm currently trying to implement an ECS system, but I've sort of ran into a problem trying to fetch all of my entities that have a specific set of components. I currently have a Dictionary that maps ...
0
votes
1answer
163 views

Intellisence doesn't show the ECS API Summaries

I am not sure if this is more of an ECS topic problem or packages in general. but it would be really helpful for ECS programming with all the summaries the Unity has provided. For unity engine methods,...
0
votes
0answers
629 views

Unity “Convert To Entity” does not work (Render) with “Skinned Mesh Renderer” for Animations

I'm trying to make a game with Unity's ECS and Job System. I came across the issue where, Convert To Entity does not support Skinned Mesh Renderer. It does not render the mesh. I need it for ...
0
votes
2answers
332 views
3
votes
1answer
3k views

How could I implement an ECS in C? [closed]

I'm looking into how to do a game engine using only C and wanted to know how to implement ECS in C. I didn't find any ECS implementation for C, it only seems to exist for C++. So I'm wondering... Is ...
0
votes
2answers
455 views

How to design components for tile-based movement in an RPG using ECS

I'm trying to re-write a small game of mine using ECS mostly for educational purposes and to see if it fits top-down RPG games in the style of Pokemon (gameboy). Since everything is tile based, ...
3
votes
1answer
807 views

Handling input in a custom ECS engine

I've been implementing an Entity Component System into my custom toy engine so I can learn more about it. Currently I have the following problem: I can't think of a way of implementing input as a ...
1
vote
2answers
362 views

How do the systems find the entities they should operate on in Entity-Component-System pattern?

I have read many articles about ECS patterns. Many of them are clear on what the entity and components are but don't really talk about the system because it "varies" or just use plain English to ...
1
vote
2answers
590 views

How can I handle scripting-like tasks in my ECS?

So I have been getting more and more into ECS architecture, and I am having a bit of trouble wrapping my head around how to handle custom actions/callbacks. For instance, let’s say I want to have a ...
0
votes
1answer
80 views

How to update model transform of components when using physics?

I implemented a high level components system for my renderer and am curious about the right way to update the transforms components of models that have a physics rigidbody attached. I am using ...
1
vote
1answer
437 views

Pure ECS, How to copy all components from one entity to another

I am attempting to create component payloads using prefabs. My goal is to use ...
1
vote
2answers
536 views

How are one-to-many relationships usually expressed in ECS architecture?

I'm trying to implement a simple ECS to help understand the concepts, and I am having a bit of trouble wrapping my head around how it would be used in cases where there is not a 1-to-1 mapping between ...
1
vote
1answer
1k views

How to delete Unity Hybrid ECS Entities?

I'm trying to get into Unity's Hybrid ECS feature. Creating and Manipulating Entities has worked fine so far for me, but somehow I can't find a viable option to delete Entities which works 100% of the ...
1
vote
1answer
876 views

Should components in Entity Component System pattern have logic?

Is often read that in entity component system pattern we should treat components just as a passive data structure with no logic at all, this way we follow to a data oriented design approach with ...
1
vote
1answer
2k views

How to design prefabs in Entity Component Systems

In Unity (and I presume other game engines) you can create "prefabs" which are blueprints for game objects. They contain a list of components, and default values for those components. Prefabs can be ...
4
votes
2answers
694 views

How to implement n-body in an Entity Component System

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-...
8
votes
1answer
3k views

Unity Hybrid ECS with “old way”

Is it possible to use Hybrid ECS with some components and the standard MonoBehaviour with all your old code? I want to know because I already have some game ...