Visual Debugger / Custom Benchmark in Godot Editor [possibly a plugin] #11421
Replies: 3 comments
-
I had this issue while debugging physics for my game, where printing numbers is both not ideal and not intuitive. |
Beta Was this translation helpful? Give feedback.
-
Maybe to make it easier to set up you could have something like this: create_graph(graph_id: PackedStringArray, time_length: float = 3, min_y: Variant = null, max_y = null)
print_graph(graph_id: String, values: float)
print_graphs(graph_id: String, values: Dictionary[String, float]) You would call create_graph to set up the graph area. Multiple graphs can be drawn on the same area by passing in multiple values into print_graphs("my_graph", { "value0": value_0, "value1": value_1 }) This is also technically possible with an EditorDebuggerPlugin but it takes a lot of setup |
Beta Was this translation helpful? Give feedback.
-
You can already create custom graphs that appear in the Debugger > Monitors tab of the editor when the project is running using custom performance monitors. While this solution is meant to be used to track performance-related variables, you can technically use it for anything. The downside is that graphs are only sampled once per second, so they'll lack precision for values that update quickly. |
Beta Was this translation helpful? Give feedback.
-
Something like
Could be core-implemented in Gdscript with a
print_graph(min, max, current [, history_size])
method that plost custom [Variant
] values in a graph placed in a bottom docker - like the profiler; or directly in the output terminal (that already supports visuals, thanks to theRichTextLabel
).The desired implementation would be for
print_graph()
be either time-sensitive or time-independent, and update the graph each timeprint_graph
was called in the running game. The plot could be an interpolation of thecurrent
values, wheremin
andmax
set the y-values' plot area ("the graph's vertical zoom"), whilehistory_size
is an optional value that sets the "horizontal zoom".A further idea, would be to allow for custom implementations for Resources and custom Resources, with custom interpolation and plot functions.
Inspiration: C++ Visual Benchmark
Beta Was this translation helpful? Give feedback.
All reactions