Questions tagged [entity-system]

A programming paradigm in which gameobjects (entities) are composed out of components, and are operated upon by systems. Each entity is an ID that points to specific components.

Filter by
Sorted by
Tagged with
0
votes
1answer
44 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
84 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
0answers
28 views

How to store 3D entity position, offset, and transformation data for parent and children?

I am looking for a cleaner pattern to storing character position data, offsets, and transformations. I currently have a character with a vec3 for position. ...
0
votes
0answers
10 views

Animation Parameters (To use later as prefab in any place in canvas)

Am using Unity3D 2019 and I'm creating a 2D WorkFlow Systems, so I found like solution to create pipeline liquid animation is the use of two Images objects first one used like a mask for the second ...
0
votes
0answers
40 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 : ...
0
votes
1answer
86 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 ...
1
vote
1answer
76 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
813 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
2k 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 ...
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
67 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
104 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 ...
9
votes
3answers
387 views

User-friendly scripting when using an ECS?

I am currently creating a small hobby project to get back into game development, and I have decided to structure my entities using an ECS (Entity Component System). This implementation of an ECS is ...
21
votes
5answers
4k views

Improving an O(N^2) function (all entities iterating over all other entities)

A little bit of background, I'm coding an evolution game with a friend in C++, using ENTT for the entity system. Creatures walk around in a 2D map, eat greens or other creatures, reproduce and their ...
1
vote
1answer
290 views

ECS - System calling other systems

I'm trying to build my first (2D) game with ECS but I always end up with some system calling other systems. Here's an example. There is a RegionSystem that manages RegionComponents. On each frame, ...
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
893 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
3answers
484 views

ECS in MMOs - How to handle IDs for different object types?

Using a DOD approach, what is the typical way to handle dealing with the actual IDs of game objects? Obviously, each entity has a unique entity_id that is ...
0
votes
0answers
62 views

Quadtree having ownership of entities, worth it?

Typically, you would have a list of entities stored somewhere, and you'd use quadtree when you need some collision testing between entities for example, by inserting all of the entities and generating ...
0
votes
1answer
261 views

LibGDX - Animate Player using Finite State Machine in Ashley ECS

Hi everyone this is my first question on this forum hope you can clarify my doubt. I'm gonna start by saying that im not very good at english so my apologies. So I have a big school project and I'm ...
0
votes
2answers
757 views

Implementations for storing entities in an ECS system

I'm restructuring my model of entities, components and systems, where entities are: ...
4
votes
2answers
701 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-...
0
votes
1answer
2k views

How can I iterate over all entities with a particular component?

I'm currently designing a game engine and want to implement my own ECS implementation, so I decided to look around for ideas. Unity has recently updated their engine and seems to be pushing towards ...
1
vote
0answers
528 views

When would I use IJobProcessComponentData and when IJobParallelFor?

Quick question regarding the Job system in conjunction with pure ECS. When would I use IJobProcessComponentData and when ...
0
votes
2answers
1k views

How to represent a modular FSM for AI using ECS?

I am considering to implement AI using ECS which actually contradicts working with naive FSMs. My current idea is to have multiple components which represent the particular state an Entity that has a <...
0
votes
2answers
161 views

How ID's work in FPS games

I am wondering how games generate IDs/GUIDs for their entities (along these lines), and which entities specifically get them. To narrow the scope of the question down, I am just focusing on FPS games ...
1
vote
1answer
187 views

How MMOs store IDs for game entities

Wondering in general how IDs are stored in a large massively multiplayer online game. From what I can imagine, it seems that each "game entity" would have a globally unique ID (GUID). Say there are ...
1
vote
2answers
420 views

Managing different types of Actors/Entities in a rendering engine

I'm coding a simple game engine using DirectX11, and I'm stuck on how to implement a kind of ECS. Now my rendering system look like this (sorry if the diagram is not real UML, it's just for ...
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 ...
3
votes
1answer
264 views

Is there a “Least Terrible Method” for sharing Entities over Network?

(Preface: Using C++, Box2D, and built UDP client and server classes that are reasonable efficient for a built-from-scratch game using client-server model.) This question is specifically in regards to ...
1
vote
1answer
612 views

ECS - should everything be a system?

I've just recently started working with LibGDX and Ashley, and I find it to be really useful and I like working with the whole entity/component/system workflow. But I've been starting to layout the ...
3
votes
2answers
591 views

Using polymorphism in an Entity-Component System without sacrificing data-oriented design

I've been planning out an Entity-Component System in C++. My idea of it is most in line with the one described on this page of the entity systems wiki. To summarize, components are just structs of ...
1
vote
1answer
340 views

How does Ashley keep systems up-to-date with its entities?

I am currently trying out Ashley and overall learning how an ECS works internally. What I currently don't understand is how Ashley in particular keeps its systems up-to-date by adding or removing ...
1
vote
1answer
464 views

Packet/Event-Based Entity-Component-System

I know what one of the big commonalities I see in ECS projects is that there is a main game loop that iterates through systems and calls their respective update methods (for example, RenderSystem). ...
0
votes
2answers
581 views

Event-Based Entity-Componenty-System

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. ...
1
vote
0answers
103 views

Clarifications On the Entity-Component-System [closed]

After searching through numerous sites on the Entity-Component-System, which is quite a lot to grasp since all my college career we've been taught variants of OOP (also that ECS isn't taught in any ...
3
votes
2answers
614 views

How to get Entitas components from gameObject.getEntityLink()

I'm new to Entitas. I have a DamageSystem that should Physics.Raycast() toward the target and if tag is enemy it should reduce ...
0
votes
1answer
423 views

Make the components of an ECS polymorphic

I have implemented an entity component sytsem (ECS) in my game engine (SFML and C++ 17). An entity has an array of components. You can get a components by its type e.g.: ...
0
votes
1answer
554 views

How does an ECS work for a world subdivided into chunks (example)?

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 ...
2
votes
1answer
584 views

Are references between entities in Entitiy Component System allowed?

I've got a player entiy in my game that can pick up weapons when colliding with item entities. The player can hold and use the weapon in their hand (the weapon sprite is rendered relative to the ...
2
votes
0answers
519 views

How can I build Goal Oriented Action Planning within an Entity Component System?

I've been creating an interactive fiction game in javascript that uses an entity component system as described here. The problem I've encountered is in developing the AI system for the game. Ideally, ...
0
votes
2answers
737 views

Should a system be able to render things? (ECS)

I'm currently building an entity component system and I just have one question... Should a system be allowed to render things to the screen? For example, should I make a SpriteComponent that contains ...
1
vote
2answers
577 views

Entity-Component-System design

I read a lot about ECS (strategy) pattern and have a few questions. Consider simple space game. We have stars there. Obviously star is an entity. What if I want to ...
-2
votes
1answer
34 views

Entity update or Keyboard commands transferred to the Gaming server?

I am working on a research project . I need to know the network communication in games in large Multiplayer games (Battlefield,GTA 5). Is there some official documentation present for these games? ...
0
votes
1answer
425 views

Circular Dependencies in an Entity Component System

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 ...
1
vote
3answers
659 views

Binding c++ templated functions to lua

I have started using Lua as a scripting language for my game engine. It works perfectly for things like input, audio etc. However, I'm now trying to bind my entity component system functions which ...
3
votes
2answers
1k views

Where is 'game logic' implemented in component based design?

I have been trying to get my head around using an entity component system for a game. But I am struggling to understand how I should do 'game-logic'. What I have so far: Components are essentially ...
2
votes
2answers
943 views

ECS component dependencies / sharing and cache locality

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. ...
1
vote
1answer
691 views

What's the proper practice to organize relationship between components in an ECS pattern?

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 ...

1
2 3 4 5
8