elm-ecs icon indicating copy to clipboard operation
elm-ecs copied to clipboard

How would I create a selector for more than 5 components?

Open peacememories opened this issue 5 years ago • 1 comments

Hi, I'm trying to find out whether to use elm-ecs for an application we are developing at work. It's not so much a game as it is an application with highly composable types, so a kind of ecs seems to make sense. It could very well be though, that we will have more than 5 of these different components, so it would be nice to know whether it's theoretically possible (and ergonomic) to select more than 5 components in a selector. Of course I'm hoping we won't need selectors that big, but you never know^^

Side note: I'll totally be fine with an answer of "no, you shouldn't be doing that" ^^

peacememories avatar Feb 25 '19 13:02 peacememories

Definitely possible. 5 was just an initial guess on how many would be needed, and it saved me some timing from adding more 😁. However I think in general it's better to keep the number of components in a selector low. For instance by merging two components together of by splitting up system logic. But if you really need more than 5 they could be added. Also if there would be selector composion (#2) you'd have some more options 😄

harmboschloo avatar Feb 25 '19 18:02 harmboschloo