ECSx icon indicating copy to clipboard operation
ECSx copied to clipboard

Idea: Double index tables

Open APB9785 opened this issue 2 years ago • 0 comments

When reverse index tables are introduced into ECSx, there might be a desire for functionality where two or more index tables are searched, to get a list of entities which are common to all search results.

For example:

Entity 123 has XCoord 10 and YCoord 5 We want to search a list of all entities found at location {10, 5} With standard index tables, we need to XCoord.search(10) and YCoord.search(5) and then somehow get the intersection of those two lists Ideally we would like to have an index table where the key is {10, 5}, so a single search returns exactly the results we want

It could also be worth testing out an intermediate approach where two searches and a MapSet.intersection is used under-the-hood while we work on a more performant implementation.

APB9785 avatar Jul 21 '23 18:07 APB9785