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

Debugger / Inspector #75

Open
pablomayobre opened this issue Aug 29, 2023 · 1 comment
Open

Debugger / Inspector #75

pablomayobre opened this issue Aug 29, 2023 · 1 comment
Assignees
Labels
devex The feature request improves Developer Experience

Comments

@pablomayobre
Copy link
Collaborator

Idea

Can we make a debugger or inspector to help with the development with Concord by grabbing internal data from the World at runtime?

Events

Use World:beforeEmit and World:afterEmit to detect start and end times of events, report the listeners and arguments and prevent propagation.

Preventing propagation can enable the debugger to freeze the code entirely without letting systems act based on any event fired by the World.

We could potentially re-emit events but this could prove difficult depending on the arguments passed to the event.

Systems

We can have a complete list of all the Systems.

We can show their Pools, with details on what Components the Filter uses, and the current number of Entities in each pool.

We can also have a list of all registered event listeners for a given System.

We can enable/disable the System remotely.

Entities

We can query the World with a given Filter, the debugger can easily list all available Components and allow you to add them to the Filter. We can use this information to list a subset of all available Entities

Alternatively the World knows about all the Entities with an ID.

With an Entity we can inspect the current set of Components given to it, and we can see which Pools contain this Entity.

If Components are serializable, we could easily show the current data for a given Component
and serialize/deserialize it's state entirely or partially.

We can easily destroy Entities, and if we have previously serialized an Entity we could easily create one based on that serialized data.

This could allow us to perform dynamic mutations to Entities.

Components

If we had a way to tell the inspector about the shape of Components, we could show specific UI for a given component and allow the user to tweak values remotely.

We can easily give a Component to an Entity currently selected in the UI, users of the library can the use this components to render a box or other information in-game to tell the Entity apart.

@pablomayobre
Copy link
Collaborator Author

I have made some progress figuring out the relationships and features I'd like to implement for this debugger, and explored some ideas on this FigJam

I have also started to code some of the interfaces needed to communicate from and to Concord, but I don't have anything to show yet.

@pablomayobre pablomayobre added the devex The feature request improves Developer Experience label Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex The feature request improves Developer Experience
Projects
None yet
Development

No branches or pull requests

1 participant