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

Add Beehave Style Integrated Debugger UI #48

Closed
meticoeus opened this issue Oct 19, 2023 · 8 comments
Closed

Add Beehave Style Integrated Debugger UI #48

meticoeus opened this issue Oct 19, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@meticoeus
Copy link

The StateChartDebugger Node is useful for debugging a single statechart at a time but feels less than ideal when trying to debug startcharts for multiple scenes at once as it seems to require resizing each debug control node so they don't overlap for each debugger you want to see at once.

BeeHave has a very nice debug interface that is added as a tab in the Godot Debugger UI that lets you view each of the active behavior trees in the current scene. godot-statecharts could do something similar by taking the existing StateChartDebugger UI and auto registering each statechart into a Godot debugger interface tab with a list to pick which statechart to view the debug ui for. BeeHave adds an auto-loaded global script to handle the debug registration in the root behavior tree node.

Great library. I felt like I could finally get a handle on how to use statecharts/FSMs with the node based approach compared to relatively cumbersome (for non trivial charts) libraries like XState for javascript.

@derkork
Copy link
Owner

derkork commented Oct 20, 2023

I'll check out how they do it in beehave, sounds like an interesting extension. I still like to have the abilitiy to inspect stuff in game though, so maybe the in-game debugger could also be enhanced to allow you to select one of the currently running state charts.

@derkork derkork added the enhancement New feature or request label Oct 20, 2023
@meticoeus
Copy link
Author

I also like the in game debugger for debugging the current statechart I'm working on. I think having both would be useful as the editor debugger would give you access to everything without having to make any changes to the scene trees while the in-game debugger is useful for focusing on debugging a particular statechart.

@derkork
Copy link
Owner

derkork commented Nov 13, 2023

Ok we're getting somewhere:

image

Still needs a lot of polishing, but it works in general.

@SirPigeonz
Copy link

Nice this will be very helpful for folks with 2 monitor settup!

It's also much more convinient to just select checkbox in the inspector, to add/remove your state chart monitored list and switch between debugging them in one place (like in Beehave) without modifing the scene tree :)

Thx fort this!

@derkork
Copy link
Owner

derkork commented Nov 21, 2023

image

So this is a bit nicer. I'm still not super-happy with the tree on the left. You somehow need to pick a state chart but the tree is very noisy looking. Any idea on how this could look nicer?

@derkork
Copy link
Owner

derkork commented Nov 21, 2023

I have pushed a branch, in case you want to try it out.. https://github.com/derkork/godot-statecharts/tree/in-editor-debugger

@derkork
Copy link
Owner

derkork commented Dec 12, 2023

Okay, so I've improved the implementation, we now also get the history in the editor and we have the same settings for ignoring parts of the history.

image
image

The whole thing is opt-in now so the debugger only shows charts that have been marked for tracking in the editor.

image

Once you reach a certain amount of state charts the amount of debug data gets really big, at which point the editor will be unhappy...

image

I'm not sure if this can be helped. I'm already culling messages whenever possible but when you have a thousand state charts in the game it will more or less try to send a thousand messages per frame when they are all busy doing something.

@derkork
Copy link
Owner

derkork commented Dec 13, 2023

I have released the current state of implementation as 0.10.0 and submitted it to the asset library. It may not be perfect but I think it is in a usable state now. Please give it a spin and let me know if there are issues. Thanks!

@derkork derkork closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants