Gamedev:DebugDrawModes: Difference between revisions
fix link |
→/DebugColVol (alt+v): 99.0- draw weapon debug spheres in /debugcolvol (aimfrom pos, muzzle pos, target pos) |
||
| Line 18: | Line 18: | ||
== /DebugColVol (alt+v) == | == /DebugColVol (alt+v) == | ||
[[File:DebugColVol.jpg|400px|left|/DebugColVol]] | [[File:DebugColVol.jpg|400px|left|/DebugColVol]] | ||
Draws unit and feature [[Gamedev:CollisionVolumes|collision volumes]] as purple meshes. When hit by a weapon the meshes turn red. | Draws unit and feature [[Gamedev:CollisionVolumes|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 [[Animation-LuaCallins#Weapons|AimFromWeapon()]] position, [[Animation-LuaCallins#Weapons|QueryWeapon()]] (muzzle) position and unit target position. | ||
<br clear="all"/> | <br clear="all"/> | ||
Revision as of 12:57, 18 July 2015
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. Since 99.0 weapon debug spheres are also drawn in this mode for the AimFromWeapon() position, QueryWeapon() (muzzle) position and unit target position.
/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
It is meant for debugging trajectories of ballistic projectiles. 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.