How do You debug variables on Screen?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
Sebastian Roll

How do You debug variables on Screen?

Post by Sebastian Roll »

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!)
Conquistador
Posts: 340
Joined: Wed Sep 28, 2005 4:38 pm
Location: Canada, Eh!

Post by Conquistador »

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
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

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
coolsummer
Posts: 24
Joined: Fri Nov 04, 2005 1:44 pm
Location: Grafenwoehr, Germany

Post by coolsummer »

hi,

maybe this (http://irrlicht.sourceforge.net/phpBB2/ ... hp?p=30735)
could help you

Andi
Guest

Post by Guest »

I just use my bitmap font routine to ouput vars on screen when I press the "debug key" I have set up - and can dump it to a text file log with another press. It uses the same font as my game uses at the time and it's fast!
Post Reply