-
Notifications
You must be signed in to change notification settings - Fork 30
Debugging
Add -debug to the command line.
There is also a -log switch which will write all debug output to the log file.
Print debug information to stderr using this printf like function:
DebugPrintf( format, ... )
To create a pop up window for errors that the player should be alerted to before the game bails out:
Msg( format, ... )
Note, that Msg is mapped to DebugPrintf since we need to think about a cross platform way to pop up a window. Supposedly a common technique is to embed a basic low res font into the source it self since most likely you'll still be able to get that basic font rendered to the screen. If not then something so bad happened that the system should provide an alert to the user that the program had an issue running.
In game you can switch to debug mode which will add a new debug menu that allows you to turn on various debug rendering features such as ability to see collision skins, unspawned enemies, etc..
To generate profiling output run, "gprof ./projectx-binary ./gmon.out > gmon.txt"
Check out the forsaken-libs run.sh which shows how you can call it.
But generally:
gdb --args ./projectx -chdir $px_folder