Questions tagged [entity-component-system]
Used when referring to the Entity-Component-System (ECS) architecture.
152 questions
0
votes
1
answer
177
views
Resource management in ECS?
I'm new to ECS. And I'm trying to create my own game in ECS. I want to ask what's the common way to do some resource management. For example, it's very common to load and unload images from disk in ...
1
vote
0
answers
151
views
ECS architecture in non-gaming scenario : best way to model relationships?
I'll preface the wall of text below by saying that I've next-to-no experience with game design/programming. But I've a situation that might be fairly interesting to folks here.
I'm currently working ...
2
votes
0
answers
67
views
Best Approach for Storing / Serializing Property Value Animations
Background
I'm making a platformer game, in C#, in Monogame. I've got a middling amount of experience with gamedev, having done some mini projects in Unity in the past and deciding I don't like a big ...
0
votes
1
answer
248
views
How to get the id of an Entity in EnTT in order to retrieve the components of an entity using the id?
I would like to implement something similar discussed in Efficient communication between entities using ECS via entt
There are two entities Ship, Engine. Ship has the components AppliedForces, Mass ...
0
votes
0
answers
359
views
How to efficiently instantiate large amount of GameObject?
The topic with the same title here
How to efficiently spawn & render many cube prefabs for a voxel world?
is actually asking about efficiently rendering.
Assume I need to instantiate a lot of ...
0
votes
1
answer
350
views
How do Entity Component Systems work?
In the project I am working on, I recently ran into a problem of software architecture:
I created a base entity class that displays a world object. Then I added functionality for the entity to have a ...
0
votes
0
answers
150
views
Preventing "pass through" situations properly when using ECS based collision detection
package versions I'm using:
Entities: com.unity.entities Version 0.51.1-preview.21
Documentation URL: https://docs.unity3d.com/Packages/[email protected]/manual/index.html
Physics: com.unity....
0
votes
1
answer
171
views
How to structure this concept in ECS?
High level
At a high level, I'm looking to create a galaxy exploration-style game.
A number of points of interest will be selectable on the map (I'd like to aim for several hundred, but flexible and ...
0
votes
2
answers
279
views
What happens with global/singleton objects when using ECS?
As I've been learning about ECS one thing that gets me confused are things like input which in my case has usually been some singleton that gets polled or in one project was event based where code can ...
0
votes
1
answer
175
views
How to handle different components of the same entity having different indices?
I'm currently working on a little ECS project and a couple doubts came to my head when dealing with systems.
Let's say I have a model component, a position component and a scale component. Each ...
0
votes
0
answers
124
views
In Unity 2021.3.29(built-in render pipeline, entities 0.51.1-preview.21), what is the proper way of DOTS based collision detection?
Packages Installed:
Entities: com.unity.entities Version 0.51.1-preview.21
Documentation URL: https://docs.unity3d.com/Packages/[email protected]/manual/index.html
Physics: com.unity.physics ...
0
votes
0
answers
150
views
ECS: How do I instantiate Entities from a file of positions
I am quite new to Unity ECS and am trying to instantiate a few thousand entities based on positions stored in a .csv file. The file format can of course change, if that helps. My problem is to import ...
1
vote
1
answer
1k
views
Efficient Queries in an archetype-based Entity Component System
I am currently writing an archetype-based ECS for learning purposes. What I noticed is that my current implementation is incredibly slow with large amounts of archetypes.
Each of my queries iterates ...
1
vote
2
answers
243
views
Reduce entity-component system boilerplate
I'm attempting to create an entity-component system in C++.
However, I've run into an annoying issue where a component system function inherently involves a lot of ceremony and boilerplate. This is ...
0
votes
0
answers
3k
views
Hierarchical relationships in an Entity Component System
I'm trying to figure out how to integrate entity component systems with scene graphs in a web game / application. The problem is of course that ECS and scene graphs are very different in nature. They ...
1
vote
0
answers
519
views
Unlit camera-facing billboard in ECS/DOTS shader
I'm attempting to create an unlit billboard shader for use in DOTS. I'm using quads to host the material
(Some regular, some DOTS for comparison purposes)
I've cribbed together something from this ...
1
vote
0
answers
362
views
Am I doing something wrong in my ECS architecture if I must choose between coupling or copying code?
I'm developing a somewhat simple, small roguelike game as my university project. Early into development I heard about Enity-Component-System and decided to go with that as my game's architecture. ...
0
votes
1
answer
323
views
How to implement movement with move speed in a multiplayer game?
I'm developing a MMO RPG using Rust and bevy both in the client and the server, which means that I'm using ECS on both sides. My game is tile based, so each tile is a point in my map in the server, ...
9
votes
1
answer
5k
views
In Bevy ECS, what is a good way to have entities reference each other?
I am wondering if there is a better way than storing the entity ID. For the sake of example, let's assume I have a world with many entities who implement the component Name. Every x amount of time I ...
1
vote
1
answer
977
views
Branchless archetype ECS?
I lately read an article about branchless programming and how it can effect performance. Since im developing a little archetype based ECS for learning purposes, i wanted to know if theres a way to ...
0
votes
2
answers
436
views
Setters and Getters in ECS?
So I'm currently working on a Game Engine for my University and I came to the point of integrating an ECS.
Thing is, I'm currently a bit unsure if it's okay to have setters and getters for specific ...
4
votes
1
answer
1k
views
In ECS, how to decrease health?
I spent a good amount of time trying to get my head around ECS but the "S" is still obscure to me - the farthest I went is that I know a System is where the magic happens; it's where ...
2
votes
2
answers
753
views
Is an ECS system without a traditional ECS memory layout a bad idea? [closed]
I've got a background in C++ but completely new to game dev, Unreal, and ECS.
Recently, I learned about ECS and fell in love with the resulting project structure and theoretical reduction of spaghetti ...
6
votes
5
answers
20k
views
I don't get why ECS is considered more performant than OOP
Let's say I have an ECS with physics and I want to kill the player when a arrow hit him. So I have a callback when there is a collision. Now there is of course different behaviors with different ...
0
votes
1
answer
783
views
How to animate game object using entities?
I am having issues with some of the DOTS stack in unity (mostly the rendering and animation) and was hoping I could use gameobjects for those parts. Not sure how to use entities inside a regular ...