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.
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
Draws unit and feature collision volumes as purple meshes. When hit by a weapon the meshes turn red. Since 99.0 weapon debug spheres are also drawn in this mode for the AimFromWeapon() position, QueryWeapon() (muzzle) position and unit target position. Shields spheres are drawn in blue. Weapon 'Query' points are in red, orange if aiming. Weapon 'AimFrom' points are in yellow. The unit centre is in magenta, and if it is different the target point of the unit is in red.
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
It is meant for debugging trajectories of ballistic projectiles. Currently broken in 98.0
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.