Debuging variables is a common task in game-dev. You allways come to a point where You want to know the x/y/z position of Your disposal hero at realtime. Of cause its possible to log down all values on console/logFile [via printf()] easily, but that will be hard to track by Your eyes. So You may want to display some dbg-info into the game screen. The info should be always on top of the scene, therefore You may use the inbuild GuiEnvironment module. BUT which gui-widget is best to do this? [addStaticText() ?] Maybe You have other solutions? Especialy to track changing values in realtime...
Sebastian
(well, hi @ all - irr rocks!)
How do You debug variables on Screen?
-
- Posts: 340
- Joined: Wed Sep 28, 2005 4:38 pm
- Location: Canada, Eh!
If it's something small, such as the FPS, or position of something, you could always place it in the title bar. Otherwise, use IGUIStaticText.
Royal Hamilton Light Infantry - http://www.rhli.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
Paris/Port Dover Pipes'n Drums - http://www.parisdover.ca
It sounds like you want a debug console. A console lets you execute commands in your game while it is running and dump the output to an overlay window.
I implemented my own before I found IrrConsole by Mohaps.
Travis
I implemented my own before I found IrrConsole by Mohaps.
Travis
-
- Posts: 24
- Joined: Fri Nov 04, 2005 1:44 pm
- Location: Grafenwoehr, Germany