beehave icon indicating copy to clipboard operation
beehave copied to clipboard

Re-implement debugger in C++

Open bitbrain opened this issue 1 year ago • 1 comments
trafficstars

read https://github.com/bitbrain/beehave/discussions/285 for the announcement for Beehave 3.0

The current debugger in C++ is not super reliable. Re-implement its functionality in C++ and make use of C++ specific language features, as well as accessing more low-level Godot APIs for a cleaner integration.

Problems with the old design

The old design combined all concepts together as the following:

  • debugger - responsible for hooking into Godot's Debug API
  • graph_edit/graph_node/tree_node UI components with dependencies into debugger
  • frames/debugger_messages - responsible for messaging

While the design worked on the surface, it was difficult to test and to extend. The new design aims to solve this with a more modular architecture

New Design

  • BeehaveServer is a new component that allows to query status about Beehave trees and their nodes
  • BeehaveDebugControl is a new native control that can be connected to a particular behaviour tree and it is able to display the behaviour tree information in realtime. It is built in a way to allow for various visualisations of the data:
    • BeehaveDebugTree visualises the behaviour tree with its statuses
    • BeehaveDebugStats visualises statistics of the behaviour tree
    • BeehaveDebugTreeHistory displays a list of states of the behaviour tree, e.g. what status the tree was in within the past 100 frames. See https://github.com/bitbrain/beehave/issues/311 for details.
  • BeehaveEditorDebugger is the component that integrates the BeehaveDebugControl into the Godot editor itself.

bitbrain avatar Jan 06 '24 13:01 bitbrain

Use this branch as a base: https://github.com/bitbrain/beehave/tree/v3

bitbrain avatar Jan 06 '24 13:01 bitbrain