All Questions
Tagged with c# entity-component-system
19 questions
0
votes
1
answer
39
views
Transform is not available in SystemBase Script (Unity Entities)
My player is baked entity in subscene while main camera is outside on scene. For some reason system cannot find transform of camera, GameObject was found though.
<...
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
189
views
What is the general technique of optimizing a game's lag by updating thousands of mesh vertices using DOTS parallelism?
*Edit: I finally figured out after some profiling that the problematic code was not actually the ones part of ECS, but this line over here:
...
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 ...
2
votes
1
answer
3k
views
How do I handle lists/arrays in Unity DOTS/ECS?
I'm new to ECS and am having issues finding the right data structure to use.
For context, I have a galaxy with solar systems that produce resources at a given rate (...
3
votes
1
answer
3k
views
In C#, is there any performance reason to implement ECS?
The formal ECS specification was developed to address gaming in a JavaScript environment.
In any C# translation, this implies all of the classes' members must be public.
My concern is that too many ...
0
votes
0
answers
1k
views
Events and Entity Component Systems?
What are common ways to implement Events in an entity component system ?
Most games typically have following events :
Damage Events
Collision Events
Area of interest Events
Entity Died/Respawn events
...
1
vote
1
answer
983
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
1
answer
249
views
How to modify single-scene ECS setup to support multiple local players in different scenes?
I'm currently developing a game in Monogame / C#. I have the underlying game engine set up in the following way:
Entity/Component/System architecture
A Scene includes a map, cameras, and a list of ...
2
votes
2
answers
399
views
Ways to synchronize lists over the network?
Im working on a little plain c# gameserver using an ecs. It follows the principles of the client/server model architecture.
However im often running into the following problem, the server has one or ...
3
votes
2
answers
1k
views
Implementing Runescape-style stat-based conditional buffs within an ECS
Prologue
I'm quite new to data oriented programming and my goal is to implement a Runescape-style stats & damage mechanic in a data oriented styme.
This is quite a complex topic (Runescape-Mechanics) ...
2
votes
2
answers
4k
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....
1
vote
0
answers
128
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 ...
1
vote
1
answer
2k
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 ...
1
vote
2
answers
3k
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 ...
1
vote
1
answer
1k
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 ...
2
votes
2
answers
4k
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 ...
6
votes
2
answers
8k
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
1
answer
229
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 ...