Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
32 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
1answer
62 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 ...
0
votes
2answers
90 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
157 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
70 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
59 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
125 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
108 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 ...
0
votes
0answers
36 views

Pseudo 3d roguelike: map representation [duplicate]

I know it's a very common question, so I'll try to be specific. I'm working on a pseudo 3d (like Dwarf Fortress or Cataclysm: Dark Days Ahead) roguelike. How you'd represent a map in a roguelike? Let'...
1
vote
1answer
115 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 ...
0
votes
2answers
190 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 ...
3
votes
1answer
209 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 ...
0
votes
1answer
145 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 ...
2
votes
2answers
179 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 ...
0
votes
0answers
31 views

Handling relative positioned components in an entity system

I am currently using artemis to do my first steps in game developement. Currently I have the following components: PositionComponent stores the location of a ...
1
vote
1answer
92 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 ...
0
votes
1answer
114 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
209 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
56 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
134 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
189 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
226 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 ...
1
vote
1answer
132 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
279 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
266 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 ...
0
votes
2answers
197 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
30 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
236 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
260 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 ...
1
vote
2answers
396 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
378 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. ...
0
votes
1answer
288 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 ...
0
votes
1answer
87 views

How to efficiently filter by a component with a specific value in an entity component system (all entities in grid position [x,y,z], for example)?

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 ...
1
vote
2answers
271 views

How do we coordinate which order the systems get processed within an ECS?

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

How to handle Entity Initialisation and Destruction

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

How should I poll for component state changes when designing an ECS?

I'm implementing an ECS and have run into a predicament. Let's say my main loop is something like (super simplified, all code below is pseudo-code) ...
1
vote
1answer
94 views

Handling of persistent key presses in an ECS

I'm currently in the planning phase of a game. The whole thing should be based on the entity-component-system (ECS) pattern. All logic is concentrated inside of the systems, i.e. that the components ...
3
votes
2answers
1k views

Entity Component System: system and components relation

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

Are virtual calls worth it for game entity management?

I have seen a lot of game programming tutorials doing this: ...
0
votes
0answers
60 views

Substepping concern for collision triggers

I've read "Fix your Timestep" article by Glenn Fiedler and convienced myself I should divide timing evenly on physics part. So I have did as follows: ...
1
vote
2answers
256 views

Getting Components to their respective System in Entity-Component Engine

I asked this question in stackoverflow, but I didn't get any responses. I think it's better suited in this exchange. I'm building a game engine of sorts (purely educational) and am not sure the best ...
0
votes
1answer
231 views

Game engine tool generating game entities

I'm writing a game engine with an editor that allows you to create individual components like sprites, fonts, and particles. Then you're able to combine these individual components into what I call an ...
0
votes
1answer
196 views

How to detect collision between entities using Ashley?

I am developing a game using Libgdx and Ashley, and I would like to know the best way to detect collisions between different entities. Currently I have been using a ContactListener that detects ...
2
votes
1answer
85 views

Gameserver Request handling

EDIT: I forgot to mention that in this implementation E stands for Entity which is just an ID, C => Component as data-only types and S for Systems which should implement logic Currently i'm working ...
3
votes
1answer
114 views

How can I manage resources in memory, and dispose of them at appropriate time with the Ashley framework?

I have been working on libGDX and the Ashley framework, and I have not been able to find any information on resource control in memory. I would like to know if there is any way to control those ...
3
votes
2answers
235 views

Where to store contiguous arrays of components?

I've been working on an entity component system and have the trouble of where to define/put the arrays of each component type. Each component type is user defined so I do not know what or how many ...
1
vote
0answers
93 views

Communication in an entity-component through public variables or public member functions [closed]

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 ...
1
vote
2answers
555 views

Entity component system design. Should ID of entities be continuous?

I am implementing an entity-component system. Below is my current implementation in c++. ...
0
votes
1answer
182 views

How to manage changing Z-Index in an Entity-Component-System?

If got an Entity Component System based game-project (like classic zelda). The Player as well as Enemys are Entities with sprite- and tranform-components. The Weapons are also Entities with sprite- ...
2
votes
1answer
390 views

Component based architecture in TypeScript

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