Questions tagged [entity-component-system]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

Unit movement for a battle simulator type 2D game (custom engine)

Firstly I'd like to explain my setup. Here is the image of the battlefield https://imgur.com/a/AW8UVWr The setup is as follows: Custom Engine. 5 steps a second (server ticks) Units are 32x32 (for ...
4
votes
3answers
1k views

Is an ECS viable in garbage collected languages?

I've done some research on Entity Component System architectures. Right now I have a convoluted OOP implementation which I'm planning on rewriting, so I was considering switching to a different ...
1
vote
0answers
24 views

ECS - Stats, damage-types & damage calculation

Prologue Im quite new to data oriented programming and my goal is to implement a runescape stats & damage mechanic. This is quite a pretty complex topic : [Runescape-Mechanics][1] and i havent found ...
0
votes
1answer
29 views

Combining a pure ECS with a FSM scheduling system

Currently I am evaluating how to refactor my core game logic since I tried to design most of it in pure ECS but isn't really completely feasible the way I intended it. My game at its core is a turn-...
0
votes
2answers
41 views

ECS multiple materials per mesh (sub-mesh)

In my toy engine I currently have a MeshComponent and a MaterialComponent. psuedo: ...
0
votes
1answer
47 views

How do I contiguously store and iterate over ECS components in C++?

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

How to decide whether a Buff should be a component or a Buff object in an ECS?

I'm developing a top-down 2D game in Javascript using an Entity-Component-System architecture and I'm struggling with the question of exactly how to implement temporary buffs / permanent passives. For ...
2
votes
1answer
92 views

How to detect collisions in Unity ECS?

I am creating a game using the new Data-Oriented Tech Stack (DOTS). I am using Entities with the PhysicsShape and PhysicsBody authoring components of the new Physics package. Some of my PhysicsShape ...
0
votes
0answers
31 views

How to design a character damage system with ECS architecture?

I am developing an game with ECS architecture and trying to design a character damage system. Does the following design fits into ECS conception and will it be extendable in future? I have an ...
2
votes
1answer
66 views

Question on parallelizing ECS Systems

Learning & Implementing an ECS system for my game, I'm wondering how I am supposed to parallelize the systems on multiple threads. Different systems can't run at the same time (unless they operate ...
0
votes
0answers
36 views

Modeling RTS game logic using ECS

So I've been trying to make a simple RTS engine for some time and I always hit a wall because of increasing, inflexible and complicated hierarchy trees. I've ultimately found out that an ECS is a good ...
0
votes
1answer
113 views

How to Implement ECS Archetypes in C#?

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

An ECS rendering system [duplicate]

I'm planning to implement an ecs system for my game but i have foreseen a problem. How will a rendering system be able to render entities in the correct order based on their depth component? What ...
0
votes
0answers
43 views

Ways to persist entities and components in an ECS?

I am working on a small multiplayer game with rpg elements using java and "Artemis ODB". Most of the logic is already done but one important thing is missing. The persistence. So i am ...
1
vote
0answers
51 views

How can I implement better system for ECS?

How can I implement better system/viewer for every entity that has components I specify in, let's say, a variadic template? I've tried to do it myself. What I started with: ...
0
votes
0answers
90 views

Implementing complex AI in an ECS?

I'm having a hard time wrapping around how something quite stateful such as complex AI would be handled in a pure ECS (such as components being only data and systems operating on that data) Things ...
1
vote
2answers
143 views

is unity DOTS mature enough to build a whole project on it? [closed]

maybe you assume this question opinion based but its not. please read the whole question. the question has 2 aspects. are all features implemented? just better say, can i do everything or any ...
0
votes
2answers
83 views

Is it a bad idea to store functions inside components in ECS?

Say I have three entities: Player, Spikes, and Zombie. All of them are just rectangles and ...
0
votes
0answers
74 views

Scrolling background in PyGame with Entity Component System

I know this type of question has been asked to death for 'normal' games, however I am struggling with relating a scrolling background to an entity component system (ECS) approach. Generic samples here ...
1
vote
0answers
63 views

Entity Component System: Dependency Between Systems

Inspired by the Entity Component System Architecture, I started to refactor my 2D tiled-based game to follow the rule "favor composition over inheritance". However, after writing the ...
0
votes
0answers
22 views

ECS: Should Systems access only one component-type [duplicate]

Let's say I have a Transform-component-type, and a Color-component-type (to keep things simple). I also have an entity E that is ...
2
votes
1answer
218 views

Component instance reference in Unreal Engine 4

I'm creating a C++ script and I want to get a reference to a component instance. For example, imagine that I want to get the player camera, which is a ...
0
votes
0answers
42 views

Managing player/AI state in Entity Component System

I am working on a 2d platformer game. Right now, I'm also using ECS. My question is how can I manage player's and AI current states in the context of ECS when some states are exclusive and some may be ...
1
vote
1answer
175 views

Entity component system: how and where store pointers to system resources or third-party lib's objects?

I'm migrating my game pet-project to ECS. I use C# (custom-made engine, not Unity). It goes pretty well, but one big thing is making me worry. This is how and where to store pointers to system ...
0
votes
0answers
107 views

Roguelike movement system

I'm trying to implement a roguelike movement system for my game. I'm using the ECS architecture. The requirements are: entities will have a mass, on which should slow down the entity movement ...
0
votes
1answer
162 views

ECS: Movement system

I'm a game developer enthusiast. I've decided to implement a game, however I'm pretty confused about all the movement mechanics (kinematics). Here goes a couple questions: Velocity x acceleration x ...
2
votes
0answers
205 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
74 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
56 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
170 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
285 views

Handling input from an ECS input system into actions in another system/actions on a entity?

Some background on my engine, each system stores a reference to an entity which has the relevant components for that system. For example movement system has only entities which possess position ...
0
votes
1answer
135 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
228 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
47 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
32 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
502 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
473 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 ...
1
vote
1answer
396 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 ...
4
votes
3answers
562 views

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

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
1answer
2k 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
131 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 ...
2
votes
0answers
468 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 ...
6
votes
3answers
2k 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 ...
1
vote
0answers
80 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
526 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
1answer
103 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
323 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
108 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
1k 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
2answers
3k 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 ...