270 16.GameTuningInfrastructure
Cross‐PlatformCommunication
If an interprocess communication system has been put in place, then it is relative-
ly easy to extend it to handle cross-platform communication. With this feature,
the tuning tool can be run on the development platform (e.g., PC) and tuning can
occur live inside the game running on the target platform (e.g., PlayStation 3).
All major console SDKs provide some means to communicate programmatically
with the console from a PC. Implementing this method is the only way for dedi-
cated editors to support on-console tuning.
16.6SchemaandExposure
Historically, a lot of games have relied on configuration files (usually of type
.INI) to expose tunable values to users. As discussed earlier, such a method is
not convenient for games that have a large launch overhead. This is even more
problematic if the result of tuning can only be seen after going to a certain loca-
tion in the game or performing a lengthy series of steps to get to it.
Exposing data for tuning involves identifying variables to expose, their types,
their value limits, and other possible tuning-related information and user inter-
face options. In this section, we discuss some possibilities available in this area.
MarkingTunableVariables
A very simple method is to give tunable variables a special declaration in the
C++ code. For example, variables can be wrapped in a preprocessor define that
would expand to register the variable with a tuning service, similar to the method
given by Jensen [2001].
This works fine with global variables but needs more thought to be extended
to handle instance variables (e.g., the object registers its tunables explicitly upon
instantiation). The registration can include the additional tuning information
mentioned previously.
Reflection
If C++ had code reflection capabilities, then the task of exposing tunables would
have been much simpler. This lack of reflection has strongly influenced some
engines to extend their systems with an accompanying reflected language in their
engines [Sweeny 1998]. The presence of reflection information simplifies matters
a lot and makes for uniform tuning code.
The .NET languages are a good role model in this area. The great news is
that C++/CLI has become a well-developed solution that can remedy such a situ-