Game Engine Architecture

(Ben Green) #1
367

9 Tools for Debugging and Development


D


eveloping game soft ware is a complex, intricate, math-intensive, and er-
ror-prone business. So it should be no surprise that virtually every pro-
fessional game team builds a suite of tools for themselves, in order to make
the game development process easier and less error-prone. In this chapter,
we’ll take a look at the development and debugging tools most oft en found in
professional-grade game engines.


9.1 Logging and Tracing


Remember when you wrote your fi rst program in BASIC or Pascal? (OK, may-
be you don’t. If you’re signifi cantly younger than me—and there’s a prett y
good chance of that—you probably wrote your fi rst program in Java, or maybe
Python or Lua.) In any case, you probably remember how you debugged your
programs back then. You know, back when you thought a debugger was one of
those glowing blue insect zapper things? You probably used print statements
to dump out the internal state of your program. C/C++ programmers call this
printf debugging (aft er the standard C library function, printf()).
It turns out that printf debugging is still a perfectly valid thing to do—even
if you know that a debugger isn’t a device for frying hapless insects at night.
Especially in real-time programming, it can be diffi cult to trace certain kinds

Free download pdf