Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trait query #188

Closed
michael-dm opened this issue Oct 14, 2024 · 5 comments
Closed

trait query #188

michael-dm opened this issue Oct 14, 2024 · 5 comments

Comments

@michael-dm
Copy link

A super nice feature this library could have is trait query.
Similar to: https://github.com/JoJoJet/bevy-trait-query

I'm not fully grasping ecs internals but it seems that flecs Components beeing entities, it should be much easier than Bevy to implement. (storing which trait is implememented on the Component)

@Indra-db
Copy link
Owner

there was some interest before from @andrewgazelka and @james-j-obrien and at my work for this, but it's on a low priority at the moment.

why would it be much easier to implement that components are entities?

@michael-dm
Copy link
Author

This was a bold claim, but I understand that it allows to add tags on the Component entity to denotes which traits it implements. Making it easy to then build a query that matches any component implementing a specific trait.

I think this is what alice_i_cecile refered to here:
https://discord.com/channels/691052431525675048/1293664836764434524/1293684733154168913

@Indra-db
Copy link
Owner

I asked in rust community: https://discord.com/channels/273534239310479360/1120124565591425034/1295772082226860104

might give it some prototype time in the near future, will see, thanks for the link

feel free to start a PR as well, I'd be down on working on this together

@andrewgazelka
Copy link
Contributor

andrewgazelka commented Oct 15, 2024

vy-trait-query

Yea definitely cool to have. I by no means need this, but I'm sure will make my life easier in some areas :)

@Indra-db
Copy link
Owner

Indra-db commented Feb 5, 2025

@Indra-db Indra-db closed this as completed Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants