Or “Brainz ala mode”?
Purpose: Initially, the purpose is to provide visual debug feedback for the MonkeyBrains agent framework. Eventually this will be extended into a GUI with controls allowing in game adjustments to both the global MB plugin and per agent settings.
Dependencies: Because it will require data directly from the agent framework (just getting the info from the scene node is pointless; we need to see what the AI is seeing) and any settings and controls will be dependent on changes to the framework, AI Debug will be dependent on the MonkeyBrains plugin. Beyond that, it should be responsive to extensions and plugins that extend MonkeyBrains.
However, I will try to make it as self-contained as possible, and a MB plugin itself, if possible, so builders can hopefully integrate it without too much hassle
Initial feature goals:
Info overlays (All toggled and set globally or per agent):
FoV (Field of View); Ghost planes defining what areas are visible to the agent.
LoS (Line of Sight); pulsing beams from agent to target – useful for seeing if the LoS is ignoring mesh it shouldn’t
Focus (Pathfinding); fading, color-coded beams between positions being considered by the pathfinding AI. For instance, when an agent is path-finding, the steering needs to find a way around all obstacles to the target, the focus lines would highlight each position the AI is considering in a kind of laser light show that will show what the AI is missing or getting stuck on. In particular, I’m hoping this will show obstacles the AI is ignoring, but the character control doesn’t, or capsule collisions the AI doesn’t predict, or errors in the pathfinding algo, or…
Path; Up to three sets of footprints showing the optimum (and possibly two alternate) path returned by the AI pathfinding. (Inspired by @thetoucher ‘s footprints in Maker’s Tale
State; Thought bubbles showing the current state (behavior?) of the agent.
These would all be generated mesh objects added to the scene node when AIDebug is enabled. Of course there would be a performance hit (especially, I’m thinking, with Focus enabled), but that’s what debug does, right
Adding a GUI for global AI settings and also for accessing agent behaviors and attributes would be the next extensions of AIDebug.