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

RFC: Allow component name globbing in archetypes? #25

Open
hmans opened this issue Apr 3, 2022 · 0 comments
Open

RFC: Allow component name globbing in archetypes? #25

hmans opened this issue Apr 3, 2022 · 0 comments
Labels
core In the `miniplex` package. enhancement New feature or request

Comments

@hmans
Copy link
Owner

hmans commented Apr 3, 2022

Summary:

Allowing archetype queries for foo*.

Pros:

  • This would allow for usage patterns where component names have a semantic hierarchy. For example, different enemy types in a game could be tagged with enemy:tank, enemy:bomber and enemy:infantry
  • It seems relatively straight forward to implement, with only very little performance cost.

Cons:

  • This might lead to patterns that are kind of considered antipatterns in the ECS world, since you may end up introducing a hierarchy into a system that is explicitly intended to avoid hierarchies.
  • In Typescript, archetypes are fully typed, and refactoring the typings to fully support this may prove very difficult.
@hmans hmans added enhancement New feature or request core In the `miniplex` package. labels Apr 3, 2022
@hmans hmans changed the title Allow component name globbing in archetypes RFC: Allow component name globbing in archetypes? Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core In the `miniplex` package. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant