Gamedev:DebugDrawModes: Difference between revisions

From Spring
Jump to navigationJump to search
Abma (talk | contribs)
Abma (talk | contribs)
fix link
Line 32: Line 32:


== /DebugTraceRay ==
== /DebugTraceRay ==
It is meant for debugging trajectories of ballistic projectiles. [https://springrts.com/mantis/view.php?id=4664| Currently broken in 98.0]
It is meant for debugging trajectories of ballistic projectiles. [https://springrts.com/mantis/view.php?id=4664 Currently broken in 98.0]


<br clear="all"/>
<br clear="all"/>

Revision as of 00:47, 6 February 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)

/Debug
/Debug

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)

/DebugColVol
/DebugColVol

Draws unit and feature collision volumes as purple meshes. When hit by a weapon the meshes turn red.

/DebugPath (alt+p)

/DebugPath Close up view
/DebugPath Close up view
/DebugPath Far out view
/DebugPath Far out view

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

/DebugDrawAI implemented in E232AI
/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 E232AI implements a real-time threatmap rendering and a real-time performance profiler.