Game Engine Architecture

(Ben Green) #1

40 1. Introduction


earlier (either rendered with the game’s rendering engine or using another
rendering package).
A related system is the in-game cinematics (IGC) system. This component
typically allows cinematic sequences to be choreographed within the game it-
self, in full 3D. For example, as the player walks through a city, a conversation
between two key characters might be implemented as an in-game cinematic.
IGCs may or may not include the player character(s). They may be done as a
deliberate cut-away during which the player has no control, or they may be
subtly integrated into the game without the human player even realizing that
an IGC is taking place.

1.6.9. Profi ling and Debugging Tools
Games are real-time systems and, as such, game engineers oft en need to profi le
the performance of their games in order to optimize performance. In addition,
memory resources are usually scarce, so developers make heavy use of mem-
ory analysis tools as well. The profi ling and debugging layer, shown in Figure
1.23, encompasses these tools and also includes in-game debugging facilities,
such as debug drawing, an in-game menu system or console, and the ability to
record and play back gameplay for testing and debugging purposes.
There are plenty of good general-purpose soft ware profi ling tools avail-
able, including
z Intel’s VTune,
z IBM’s Quantify and Purify (part of the PurifyPlus tool suite),
z Compuware’s Bounds Checker.
However, most game engines also incorporate a suite of custom profi ling
and debugging tools. For example, they might include one or more of the fol-
lowing:
z a mechanism for manually instrumenting the code, so that specifi c sec-
tions of code can be timed;
z a facility for displaying the profi ling statistics on-screen while the game
is running;
z a facility for dumping performance stats to a text fi le or to an Excel
spreadsheet;
z a facility for determining how much memory is being used by the en-
gine, and by each subsystem, including various on-screen displays;
z the ability to dump memory usage, high-water mark, and leakage stats
when the game terminates and/or during gameplay;

Profiling & Debugging

Memory &
Performance Stats
In-Game Menus
or Console

Recording &
Playback

Figure 1.23. Profi l-
ing and debugging
tools.

Free download pdf