darthdeus / comfy

Comfy is a fun 2D game engine built in Rust. It's designed to be opinionated, productive, and easy to use.
https://comfyengine.org
Apache License 2.0
678 stars 28 forks source link

World inspector for hecs #85

Open nuts-rice opened 6 months ago

nuts-rice commented 6 months ago

Would it be a good idea to have a egui window that keeps track of entities and their associated components within some of the more complex demos like perspective camera and ldtk? Perhaps not as simple and clean as a "comfy" straightforward demo, but it could serve as a debugging tool going forward with more dense level and game design.

darthdeus commented 6 months ago

I'm not sure if this is possible to do in general without some kind of reflection API. I vaguely remember discussing this some time ago and being told that the only way you can do this is if you register the components explicitly.

Which could definitely work, but it makes it a bit more tricky to implement.

I'd say a good way to start with this would be to just make a prototype that does this. Since comfy doesn't hide any of its internals I don't think there's any reason why this couldn't be a separate crate.