Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
100 views

I'm working on an ECS system, but in order to iterate across pairs of queries, I need to be able to fetch components only for a limited scope when executing a system. To do this, I'm trying to make a ...
gjh33's user avatar
  • 121
2 votes
1 answer
120 views

This problem has a ton of architecture behind it, so I'm going to do my best to minimize it. I am working on an ECS framework (not very original). I have the ability to choose storage type via ...
gjh33's user avatar
  • 121
3 votes
1 answer
86 views

I run into this same problem with a different flavor over and over and I'm not sure entirely how to describe it, so I'll simply give an example and explain how I'm stuck. I'm working on an ECS system ...
gjh33's user avatar
  • 121
2 votes
1 answer
96 views

I am writing an asteroids-like game in rust with the bevy game-engine as a learning-project. The gameplay works fine (the ship can shoot at asteroids until there are no more), but I have difficulties ...
Kaligule's user avatar
  • 830
1 vote
0 answers
89 views

I'm trying to write an ECS system that can query components by value, reference, or mutable reference. For this, I want a different implementation for various tuple types as an Archetype. trait ...
gjh33's user avatar
  • 121
0 votes
1 answer
86 views

I'm currently working on a Entity Component System (ECS) for a game I'm developing in C# and Monogame. My GameObject class has a dictionary with all its components, and this method is written to ...
Germán's user avatar
  • 65
0 votes
2 answers
132 views

I'm developing an Entity Component System (ECS) in C++ and I'm trying to find an efficient way to iterate over different component structs using a single function. Here's an example of my component ...
TNP's user avatar
  • 1
1 vote
1 answer
183 views

So I have a question about ECS and how to structure it in a way that's performant in C++. Say I want to have components that are just data, and systems that are just logic, and I want to execute all ...
jocamar's user avatar
  • 103
0 votes
1 answer
184 views

I have a TextBundle as a Children of an Entity with a SpriteBundle. I want to change the transform of both of these in a query, I tried something like this: mut query: Query<(Entity, &Creature, ...
Bjørn Pollen's user avatar
1 vote
1 answer
215 views

I tried to store and retrieve structs by reference using C#. What actually happened is that each struct that I attempted to retrieve was copied, and not returned by ref as instructed. I have a "...
Noel's user avatar
  • 17
1 vote
2 answers
86 views

Is it possible somehow to do template function specialization like this: template<typename T, typename... Args> void Func(size_t id, Args... args) { std::cout << "1\n" } ...
Vovyaklya's user avatar
0 votes
1 answer
84 views

EDIT: reproducible link to typescript's playground I also found a solution that is in the link as well, though I don't actually understand why my first one doesn't work if anyone still wants to ...
kamcknig's user avatar
  • 945
1 vote
1 answer
60 views

I have a small problem that I've been unable to solve after several hours. I don't know if a sharper mind could offer me a solution? I'm using a method that returns a predicates : this is xxx. It's ...
jon's user avatar
  • 1,886
1 vote
1 answer
72 views

I am currently exploring an alternative to an approach that previously worked but has some complexities in JavaScript that I would like to avoid. So, I've reconsidered the TypeScript layer a bit, and ...
jon's user avatar
  • 1,886
0 votes
1 answer
188 views

I would like to copy a resource from the render world to the main world. How can I achieve this? e.g., I have a resource like this: #[derive(Resource, Clone, Deref, ExtractResource, Reflect)] pub ...
Corylus's user avatar
  • 937
1 vote
1 answer
57 views

i get weird behavior here, if i assign a default array in generic of Compositor<CT extends ComponentType[]=[]> ts keep infer ComponentType[] instead of [] to my type SystemWithRule ! this make ...
jon's user avatar
  • 1,886
1 vote
0 answers
41 views

Hi how i can allow a class with tuple as generic to be pass to a function with a class with union generic ? is it possible , is there a suggestion you can give me ? thanks Here the code , i want pass ...
jon's user avatar
  • 1,886
1 vote
1 answer
35 views

I am trying to implement a toy ECS for a hobby engine, and am following a small tutorial to kick-start it. An extremely bare-bones implementation using the tutorial is the following #pragma once #...
bsdsylvia's user avatar
0 votes
1 answer
79 views

I am playing around with LeoEcs and I keep writing the following code: if(!entity.HasComponent<T>()) return; ref T comp = ref entity.GetComponent<T>(); This looks pretty tame, but it ...
Arsenic Natapov's user avatar
0 votes
0 answers
67 views

I am at the point in the custom ECS I'm making where I am trying to retrieve components I've stored. The issue is when I try to access the array element as a reference it ends up having a memory ...
RataEE's user avatar
  • 1
0 votes
0 answers
225 views

I wrote a simple test program that creates 100 entities per frame, each entity has a buffer, as follows: void Execute(Entity projectileEntity, [ChunkIndexInQuery] int chunkIndex, ref LocalTransform ...
Kaihui Gao's user avatar
-2 votes
1 answer
55 views

Long story short: I am developing a small game with libgdx/ECS (Entity-Component-System) and had now mutiple times the issue that I changed the code and afterwards some other behavior was not working ...
Max's user avatar
  • 1
1 vote
1 answer
456 views

I have aligned my approach with my nearest current architecture, striving to minimize complexity as much as possible. I have aimed for the closest approximation to a satisfactory result, but I ...
jon's user avatar
  • 1,886
0 votes
0 answers
106 views

Basically, i have a player script in DontDestroyOnLoad(), and i have other gameobjects (enemies) that i want to access from the other loaded scene. foreach(Enemy enemy in FindObjectsOfType<...
Legendized's user avatar
1 vote
0 answers
456 views

I am currently designing an Entity Component System (ECS) where each entity is of a unique type: template <typename... ComponentTypes> struct Entity { using Signature = std::tuple<...
bibanac 's user avatar
0 votes
0 answers
373 views

Recently I started learning about ECS and I decided to try and create a very basic implementation on my own. I made myself an enum with the component names and two basic components: enum Components { ...
roku's user avatar
  • 55
1 vote
0 answers
131 views

I've thought about creating a programming language specifically for developing ECS, but I do not have enough experience to conclude whether or not it would be useful at all or not. Can anyone give me ...
quaivatsoi01's user avatar
1 vote
1 answer
54 views

I can't access/modify the member object of wrapper class by another member object of the same class. Basically, I have a transform object and collider object inside a gameobject and I wish to access ...
Seon Il's user avatar
  • 43
2 votes
0 answers
201 views

I'm making a game in rust, in Bevy with Rapier2d physics. I want to apply forces to the entities from different functions (systems). How is multiple external forces added to entities?
Ask Sødal's user avatar
1 vote
1 answer
83 views

I'm trying to figure out Entity Component System and for usability I need to be able to pass an array of different Component definitions and get a merged type as a result. I'm trying to do this: const ...
user64675's user avatar
  • 366
0 votes
1 answer
277 views

I am trying to implement an Entity Component System (ECS) in C# using structs or arrays, but the performance is not that much better than using classes and objects. Despite utilizing techniques such ...
Pepernoot's user avatar
  • 3,643
1 vote
0 answers
54 views

Where to put the domain logic in an Entity Component System? For sure you will not put it onto the Entity (number) itself but you can implement it as method on the Component but also as Method on the ...
Beachwalker's user avatar
  • 7,945
0 votes
1 answer
90 views

I want to write a simple entity component system. class Component { } class Entity { readonly components: Array<Component> = [] } class T extends Component {} class F extends Component { ...
eguneys's user avatar
  • 6,490
0 votes
0 answers
134 views

TLDR: Is there a type system which allows we to express a type (constraint/interface) I = NoField<'a'>, such that for all type T, if T <: I, then T is a struct and does not have a specific ...
xiang0x48's user avatar
  • 681
1 vote
0 answers
440 views

I'm trying to use ECS in a project that has classes with different abilities and I'm curious to know how to implement that using ECS or if it's even a good idea to use ECS in the first place. Note: ...
nondescript's user avatar
0 votes
2 answers
122 views

I am designing an ECS and I have a struct that holds two values: an array of integers and a double pointer. I also have another structure that holds a pointer to the previous struct. I'm able to ...
PB020's user avatar
  • 55
1 vote
1 answer
2k views

I am adding Entt Ecs to my project I wonder while iterating throughout the registry with Registry.each([&](auto EntityID) Is there any chance we can get EntityID as entt:null? If there is then I ...
Techno Gamer's user avatar
0 votes
1 answer
105 views

I am using the A-Frame watcher plugin to create the scene, I was creating two entities for left and right tracked-controls-webxr. When I start my dev server from webpack I get this error: core:a-node:...
Brent Williams's user avatar
0 votes
0 answers
261 views

I am developing a small game in SDL2 and am in the process of implementing a Quadtree for collision detection in the ECS I have written. The structure of my Quadtree class is similar to this one and ...
Nick Román's user avatar
0 votes
2 answers
279 views

Let's say I have a component Position. This component has only one data, its... position. So it could be defined as this: struct Position { Vector2 value; }; But it's really redondant in access ...
rafoo's user avatar
  • 1,650
1 vote
1 answer
302 views

I have a class that inherits from ComponentSystem in ECS and for some reason the OnUpdate function is being called unintentionally in every scene. Even if I create a new blank scene, the loop is ...
ScorpioServo's user avatar
1 vote
1 answer
1k views

I am having a problem with Unity ECS. My system does not find my entity with its query. This is my setup : I am currently testing with just one entity, that is created by a prefab, using this function ...
Jonathan Schneider's user avatar
0 votes
1 answer
415 views

I'm writting a thin wrapper over a class from a third-party library. My code looks like this: template<typename TArg1, typename... TPack1, typename... TPack2> class MyWrapper<TArg1, TPack1...,...
Daniel Marques's user avatar
1 vote
0 answers
121 views

I am looking into the performance of object lookup vs array lookup for a particle system. Each particle just has x, y values. I can either store these in an object, array, or two separate arrays, one ...
Frank's user avatar
  • 2,274
0 votes
1 answer
475 views

I am using the Legion ECS and trying to use multiple mutable queries and running into some borrow checker constraints. I basically want to update the state of components by comparing with all of the ...
Toby Hede's user avatar
  • 37.3k
1 vote
1 answer
270 views

I'm implementing a game engine in C++ which uses an ECS (Entity-Component-System). Each GameObject can have multiple Components (stored in GameObject's std::vector<Component*> _components). I ...
FeuFeve's user avatar
  • 17
0 votes
0 answers
460 views

I'm currently working on a simple game/game engine in C++ that uses an Entity Component System design pattern (wanted to learn how they worked), where each entity is just an ID to link to it's ...
Nathan Mayes's user avatar
-1 votes
1 answer
236 views

so I'm new to the game making world and I come from object oriented preceptive on things but I want learn every thing about entity component system pattern ,how it works ,how to draw the diagrams and ...
a. 1's user avatar
  • 13
1 vote
2 answers
214 views

I am fairly new to C++ and am working on a personal project. I want to create a vector<Entity*> entitities in C++ where each Entity object is unique. I have a class inside header Entity.h that I ...
Rahul Pillai's user avatar
0 votes
1 answer
310 views

I'm writing a shared library in C++ and have the (mostly educational) goal to have every bit of heap allocation done by the library to live in a single, contiguous block, allocated at initialization ...
Gabriel Golfetti's user avatar