Debug

From TorqueWiki

Jump to: navigation, search

Contents

[edit] log Mode

Logging to console.log

tge -log n

n:

  • 1=append (or 5)
  • 2=overwrite (or 6)

[edit] Scripting Workflow

Reload a script from the console (start the path with the name of the mod):

exec("GameOne/client/myScript()");

To type less create a function which reloads the script you edit:

function mye()
{
  exec("./myScript.cs");
}

[edit] Console commands

[edit] Links

wiki/TorqueScript_Console_Functions_2

Better Console Debug Output: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8729

[edit] Commands

trace(true);       // Turns on console trace output, trace(false); to disable it.
tree();            // Displays a graphical hierarchy and object inspector for
                   // all objects currently registered in the system.
object.dump();     // Dumps a list of all console commands and instance variables on an object.
set.listObjects(); // Lists all of the objects in a set.

[edit] metrics()

Get performance info:

metrics( fps );

metrics(video);

To use the video metrics first type metrics(video); into the console window (and press enter) and then type glenablemetrics(1); (and press enter)

You need to type metrics(video); first to get the other working.


fps metrics +
TC: Total triangle count.
PC: Total primitive count.
T_T: Terrain triangle count.
T_P: Terrain primitive count.
I_T: Interiors triangle count.
I_P: Interiors primitive count.
TS_T: Shape (DTS) triangle count.
TS_P: Shape (DTS) primitive count.
?_T: Uncategorized triangle count.
?_P: Uncategorized primitive count.

[edit] Debugger

Debugger for Linux: http://eviwo.free.fr/torque/Debugger-documentation.html

Just start the python debugger script: ~/torque/DebuggerForTorque$ ./DebuggerForTorque.pyf and load the paramerter file in the mod directory: game-torqueDemo_DEBUG.TDebug

If the game/debugger seems frozen on LINUX If you don't see the mouse pointer after starting debugging or after relaunching the game : don't panic !

=> use "escape" key to display the "quit mission" panel , click on "no" and continue to play. The display of the "quit mission" panel reset the torque engine.

[edit] Profiling

http://tdn.garagegames.com/wiki/TorqueScript_Console_Functions_2

[edit] Server/Client Issues

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=12132

[edit] Find Unused Assets

http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=6605

Personal tools
Games
Game Development
Modeling for Torque
Torque Game Builder (2D)
Console