1.6. Runtime Engine Architecture 31
OS
Figure 1.14. Operating system layer.
3 rd Party SDKs
DirectX, OpenGL, libgcm, Edge, etc. Havok, PhysX, ODE etc. Boost++ STL / STLPort Kynapse Granny, Havok Animation, etc. Euphoria etc.
Figure 1.15. Third-party SDK layer.
On a console, the operating system is oft en just a thin library layer that is
compiled directly into your game executable. On a console, the game typically
“owns” the entire machine. However, with the introduction of the Xbox 360
and PLAYSTATION 3, this is no longer strictly the case. The operating sys-
tem on these consoles can interrupt the execution of your game, or take over
certain system resources, in order to display online messages, or to allow the
player to pause the game and bring up the PS3’s Xross Media Bar or the Xbox
360’s dashboard, for example. So the gap between console and PC develop-
ment is gradually closing (for bett er or for worse).
1.6.4. Third-Party SDKs and Middleware
Most game engines leverage a number of third-party soft ware development
kit s (SDKs) and middleware, as shown in Figure 1.15. The functional or class-
based interface provided by an SDK is oft en called an application program-
ming interface (API). We will look at a few examples.
1.6.4.1. Data Structures and Algorithms
Like any soft ware system, games depend heavily on collection data structures
and algorithms to manipulate them. Here are a few examples of third-party
libraries which provide these kinds of services.
z STL. The C++ standard template library provides a wealth of code and
algorithms for managing data structures, strings, and stream-based
I/O.
z STLport. This is a portable, optimized implementation of STL.
z Boost. Boost is a powerful data structures and algorithms library,
designed in the style of STL. (The online documentation for Boost is
also a great place to learn a great deal about computer science!)
z Loki. Loki is a powerful generic programming template library which is
exceedingly good at making your brain hurt!