Gamedev:DebugDrawModes: Difference between revisions
m Flozi moved page User:Flozi/Gamedev:DebugDrawModes to Gamedev:DebugDrawModes without leaving a redirect: done |
category |
||
| Line 39: | Line 39: | ||
[[File:DebugDrawAI_E232AI.jpg|400px|left|/DebugDrawAI implemented in E232AI]] | [[File:DebugDrawAI_E232AI.jpg|400px|left|/DebugDrawAI implemented in E232AI]] | ||
This mode is toggled through the engine but is up to the native AI to implement itself. The image shows how [[AI:Skirmish:List|E232AI]] implements a real-time threatmap rendering and a real-time performance profiler. | This mode is toggled through the engine but is up to the native AI to implement itself. The image shows how [[AI:Skirmish:List|E232AI]] implements a real-time threatmap rendering and a real-time performance profiler. | ||
[[Category: Game Dev]] | |||
Revision as of 15:10, 12 October 2014
Debug Drawing Modes
Spring has several drawing modes which are useful for debugging and performance checking. They are listed below by UI commands with their default key binding.
/Debug (alt+b)

Draws a toggleable list of engine functions and a breakdown of how much time is spent computing them. When toggled on a line graph is drawn to illustrate the change in performance over time.
Since 97.0 there is a new Frame Grapher visualisation which shows how the last half-second was spent:
- Green are video frames
- Red are simframes
- Blue is swapBuffer (gpu/vsync)
- Pink is lua gc
/DebugColVol (alt+v)

Draws unit and feature collision volumes as purple meshes. When hit by a weapon the meshes turn red.
/DebugPath (alt+p)


Draws pathfinder routes, colour coded by accuracy.
- Red is the most finely computed pathing
- Green is intermediate paths
- Blue is least accurate long range path
/DebugTraceRay
Is intended to draw the result of ray tracing calls. Currently broken in 98.0.
/DebugDrawAI

This mode is toggled through the engine but is up to the native AI to implement itself. The image shows how E232AI implements a real-time threatmap rendering and a real-time performance profiler.