Torque 2D/Debug Banner

From TDN


Image:DebugBanner_01.jpg

The debug-banner can be activated by calling the following function on your t2dSceneGraph object:


mySceneGraph.setDebugOn( 0 );



The debug-banner contains the following information:

Banner Name

Synopsis

Notes

TotalObj

Total Objects in Scene-Graph.

This is the quantity of objects added to the scene. Soon, this will additionally have objects that are enabled/disabled as seperate stats.

SceneTime

Current Scene-Time.

This is world-time since start-up and is not necessarily indentical with the internal platform-clock.

ActualFPS

The current FPS.

The current FPS is taken directly from the platform FPS calculation. It does not directly relate to the simulation FPS as the two can be decoupled.

See “setScenePhysicsFPSActive()”.

MinFPS

The minimum FPS since start-up.

The minimum FPS currently includes the time taken during start-up. This can lead to low MinFPS values, depending on how fast the system is. This will be rectified in the future by not being calculated until a period of time has elapsed (settle-time).

MaxFPS

The maximum FPS since start-up.

The maximum FPS isn’t affected by start-up issues and is therefore accurate in all situations.

DeltaFPS

The Difference between the min/max FPS.

This allows you to get an idea of the difference between you maximum and minimum FPS.

X-Pos

The X-position of the current camera.

-

Y-Pos

The Y-position of the current camera.

-

X-Width

The width of the current camera view.

-

Y-Height

The height of the current camera view.

-

Zoom

The current camera zoom.

-

X-Min

The X-position of the top-left of the current camera view.

-

Y-Min

The Y-position of the top-left of the current camera view.

-

X-Max

The X-position of the bottom-right of the current camera view.

-

Y-Max

The Y-position of the bottom-right of the current camera view.

-

BinReloc

The quantity of bin-relocations this frame.

See “t2dSceneGraph::initialise()”.

MaxReloc

The maximum quantity of bin-relocations since start-up.

See “t2dSceneGraph::initialise()”.

BinCollis

The quantity of bins searched for all collisions.

See “t2dSceneGraph::initialise()”.

MaxCollis

The maximum quantity of bins searched for all collisions since start-up

See “t2dSceneGraph::initialise()”.

PotCol

The broad-phase potential collisions searched.

This gives you an idea of how many collisions the system is broadly checking for.

ActCol

The actual (broad+narrow phase) collisions found.

This gives you an idea of how many collisions are taking place.

ColHit

The percentage collision-hits of “ActCol” to “PotCol”.

The higher the percentage here, the more efficient the collision-system is working.

See “t2dSceneGraph::initialise()”.

Contacts

The number of contact-points calculated by the collision-system.

-

PotRender

The broad-phase potential object-renders searched.

This gives you an idea of how many objects to render the system is broadly checking for.

ActRender

The actual object-renders found.

This gives you an idea of how many object-renders are taking place.

RenderHit

The percentage of render-hits of “ActRender” to “PotRender”.

The higher the percentage here, the more efficient the render-system is working.

See “t2dSceneGraph::initialise()”.

SortedObj

The number of objects sorted in preparation to layer-rendering.

After the set of objects to render (“ActRender”) has been determined, they are sorted according to the layer-sorting rules specified in the scene-graph.

See “t2dSceneGraph::initialise()”.

ParFree

The number of free particle blocks allocated (one per particle).

The particle system attempts to keep a quantity of particle-blocks free so that it can quickly allocated particles without allocating any platform memory (cache).

ParUsed

The number of used particle blocks (particles).

This is the quantity of active particles. The higher the number, the worse the performance. This value on its own can be the cause of poor performance and should be kept to an absolute minimum by careful designing of particle effects/emitters.

*PhyFpsLim

The physics FPS Limit (lower-threshold).

See “t2dSceneGraph::setScenePhysicsLimitFPS()

*PhyFpsTgt

The physics FPS Target (simulation target).

See “t2dSceneGraph::setScenePhysicsTargetFPS()

*PhyMaxItr

The maximum physics iterations allowed (when below Limit).

See “t2dSceneGraph::setScenePhysicsMaxIterations

*FrameDown

The quantity of frame inactivity.

This will become obsolete very shortly but at the moment, there is no sub-frame simulation whilst the integrator is waiting for the target-time to elapse. This will change with the networking inter/extrapolation work.

*PhyItrTim

The physics time spent doing physics iteration this frame.

-

*PhyUnfTim

The physics time not used but to be added to next frame (underflow).

When the simulation is running, it will only process elapsed-time up to the target-fps integration-time. Anything over this time (slower fps) will be added into the elapsed time during the next-frame and hopefully used there.

*PhyOflTim

The total physics time out-of-bounds (overflow – lost time).

The simulation will ignore elapsed-time if it exceeds one-second (1000ms / 1 FPS). At this point, anything added here will be ignored but tracked here as a cumulative total of lost time.


* Only used when t2dSceneGraph::setScenePhysicsFPSActive() is activated.