Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Should be able to search entities in the debugger #98

Open
Ukendio opened this issue Dec 24, 2023 · 1 comment
Open

Should be able to search entities in the debugger #98

Ukendio opened this issue Dec 24, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Ukendio
Copy link
Contributor

Ukendio commented Dec 24, 2023

Adding onto #97, it is currently very difficult to find a very specific entity in your game. Sorts mediate this, however fundamentally there needs to be better capabilities to search for them.

I have already laid out the ground work for the search filter's functionality. Not the best implementation yet but it works reasonably well without being intrusive for anyone to call. The function searchFilter can be found in the branch "search-filter". You pass in a world and a query string. E.g. searchFilter(world, "Test, Friend, !Hello, !Goodbye") which will query for entities with Test and Friend while skipping any entities that contain either of Hello or Goodbye

The idea for the implementation would be to grab the input of a textbox and feed that to the searchFilter's params. And then taking the returned entities and display them on the widget.

@Ukendio Ukendio self-assigned this Dec 24, 2023
@Ukendio Ukendio added enhancement New feature or request help wanted Extra attention is needed labels Dec 24, 2023
@TrippTrapp84
Copy link

Mentioned this is Discord

Making a query language which searches entities for matching components and component data is really complex. I think it would be easier to just search for matching components, then use luau pattern matching to narrow down your search. The patterns could be matched against a serialized string of the component data, and any entities who don't have matches for every pattern are removed from the search.

This is way less difficult to do, and still a very powerful search tool. It also uses peoples prior knowledge of luau pattern matching.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants