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

Customization point #12

Open
Yelnats321 opened this issue Mar 9, 2017 · 1 comment
Open

Customization point #12

Yelnats321 opened this issue Mar 9, 2017 · 1 comment

Comments

@Yelnats321
Copy link
Owner

Had an idea for a while to specify the underlying storage of a component (for example an unordered_map may be more performant for some data sets). This would be done by supplying a component_list with an unordered<T> as a template argument, which seems like a very clean way of doing it, but might be hard to implement.

On a similar vein, add a not option for get_entities and for_each, so one can ask for specific tags/components and also specify which tags/components not to have. So something like for_each<Position, Player, not<Inactive>> would fetch every player+position that does not have the Inactive tag. Not restricted to tags, could be components too.

@Yelnats321 Yelnats321 changed the title Customization poins Customization point Mar 9, 2017
@Yelnats321
Copy link
Owner Author

Customization points are currently on hold until I gather a good way of customizing the containers. There is a lot to consider (custom containers? allocators? how about in-place construction of those?).

If you really care about customizing the containers used please comment, and to what extend you want customization.

The three places customization makes sense is:

  1. How components are stored
  2. How groupings are stored/allocated (don't forget there is an internal grouping with all entities in it)
  3. What get_entities should return

Again, it's a hard problem filled with various challenges that I won't tackle unless someone actually wants to use custom allocators/containers and can make an argument why it's useful.

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

1 participant