#I'm reimplementing my apply on demand to
1 messages · Page 1 of 1 (latest)
honestly there's a part of me that's starting to become partial to the idea of hard-enforced archetypes
by that I mean your "ultra hot" code paths are hard-coded tables in flecs that never swap archetype locations
That would actually be quite helpful tbh. Archetypes hardly change in games. Mostly tags that move around a lot and that can be implemented differently
which is a massive bummer as it removes the fun of compoisition, but it turns your "enemy location" table into something much more reliable
- you could probably store component pointers
- you never have to fight off funny mixed up queries
I wonder if entt has these issues
the idea would be that you hard-define the table at frame 0 and store a handle to it or something, then query it as normal for other things
That should be possible already, right?
yes
Shouldn't be too hard to make a nice API for it
but it's a bit defeating the purpose in some ways 😛
Queries kinda do the same thing, but also include other tables. It sounds useful imo
I know that if "enemies" somehow fall outside the table something is wrong. Messes up composition tho
A lot of my transform systems takes are second-hand from more experienced ecs enjoyers like vblanco fwiw
It would be interesting to make a giant benchmark comparing different styles
That would be best tbh.
I'm not comfortable with vblancos style not doing cycle detection. But it's pretty fast
Imo you could add cycle detection in debug mode
Makes transform queries a tad slower in flecs, which may be concerning cause I use transforms in majority of my systems
True, that could be done.
I generally prefer immediate, on demand calculation to syncing up at end of frame.
I was reading up on bevy transform system again, and it basically said if you want to use global transforms, add the system to end of frame schedule
Otherwise, calculate on demand using an expensive query
I'm doing something similar to what vblanco is doing. Calculate on demand, but I'm using relationships for hierarchy.
Problem is that I now have to make the relationship a union to reduce fragmentation. But unions can't hold data, which means the local transform has to be a separate component.