dominion-dev / dominion-ecs-java

Insanely fast ECS (Entity Component System) for Java
https://dominion-dev.github.io
MIT License
294 stars 18 forks source link

QUESTION: Is it possible to work with entities with more than 6 components? #74

Closed langurmonkey closed 2 years ago

langurmonkey commented 2 years ago

Right now, the Dominion.findEntitiesWith() method accepts up to 6 component types. The returned Results object maps the types for each component by position and allows for their retrieval. Is there a mechanism in place to enable finding and working with entities with more than 6 components? Is this something that will come at a later stage?

enricostara commented 2 years ago

Hi Langur, the short answer is yes.

The long answer is yes, but you will still unpack max 6 components, as I plan to add the new method on the Results and it will accept more components type without any limit. In this way, you will be able to refine your entity search with any number of component types but you will still get unpacked max 6 components.

Why?

The updated Results API maybe:

(new) -> andWith excludeWith -> andWithout withState -> andWithState

langurmonkey commented 2 years ago

Awesome, cheers!