Chapter 1: Overview


This book is written for people who may or may not have experience with 3D graphics and want to look at the bigger picture of game engine design. This first chapter looks at game engines from a broad perspective. The goal is to provide an overview of game engines that will serve as a foundation for the detailed discussion in the rest of the book. Over the course of the book, we will explore each aspect of game engines and examine the corresponding features in the source code for the example game engine provided with the book (downloadable from the Apress Web site at http://www.apress.com). Each chapter focuses on a major concept or subset of the game engine. Several chapters are dedicated to different types of graphical rendering, since different techniques are employed based on the complexity of the object being rendered.

What Is a Game Engine?

A game engine is the very heart of any computer game. Many times the engine is highly coupled to the game and unique to that game. A properly designed engine, however, is modular, reusable, and flexible enough to be used for multiple games that are similar. A game engine is generally designed and optimized for a particular type of game. These types include first-person shooters, real-time strategy games , and vehicle simulations, to name a few of the most popular.

The commercial game engines described here are each highly optimized for their respective games, which were written by teams of highly experienced professionals who spent many man- years developing them. These commercial games must perform well on a wide range of computer hardware. They are written to use either DirectX or OpenGL rendering so that players are free to choose the one that works best for the video card in their system. The commercial software uses advanced methods such as vertex and pixel shaders with proprietary coding in order to provide their respective companies with an edge in the game market.

First-Person Shooter Game Engines

First-person shooter game engines are often based indoors. This places an emphasis on visual detail and animations. Increased visual detail comes at the cost of more textures and increased polygon count across a given game level. To compensate for this (which is necessary to maintain a reasonable frame rate), most of these engines rely on Quadtree, Portal, or Binary Space Partition (BSP) culling. Culling is the process of removing polygons from the scene. (More detail on these culling methods appears in Chapter 3.) Examples of this genre include Doom and Quake (in its many versions) from id Software and Half-Life (including the extremely popular Counter-Strike version) from Sierra.

Real-Time Strategy Game Engines

Until recently, real-time strategy games have been two-dimensional, sprite-based games that use a fixed viewpoint and cleverly designed sprites to give the illusion of three dimensions. Newer games such as Empire Earth from Sierra and Age of Mythology from Ensemble Studios have brought this type of game into the 3D environment. Figure 1 “1 shows a scene from Age of Mythology.

click to expand
Figure 1 “1: A scene from Age of Mythology

This type of game is generally set outdoors and faces the daunting task of displaying a very large number of objects at one time as well as an expansive terrain. The game engines for these games use an aerial view to reduce the number of objects and the amount of terrain that is within the player s view. These games can also use objects that are somewhat lower in resolution than those we would typically find in a first-person shooter. Since the viewpoint is kept at a fixed distance from the ground, the player doesn t typically get close enough to an object to see the details that would require high-resolution modeling.

Vehicle Simulation Game Engines

The third type of game engine mentioned is the vehicle simulation category. This group includes first-person military combat simulators (planes, helicopters, tanks, etc.), racing games, and other driving games. One example of this type of game is Comanche 4 from NovaLogic.

Since the setting for these games is outdoors and the view angle is relatively unconstrained, special techniques are required to maintain a playable frame rate. These techniques fall primarily in the areas of culling and level of detail (LOD) to reduce the number of polygons that must be textured and drawn. One of the most common methods in outdoor simulation games is to move the far clipping plane nearer to the point of view. This causes any polygons beyond the plane to be culled from the scene. An adverse effect of this is that the player can see objects appearing and disappearing at the far clipping plane as the viewpoint moves. The solution to this problem is the judicious use of fog. Fog or haze allows polygons to fade to the selected fog color as they approach the fog maximum distance (usually at or just short of the far clipping plane). Both LOD and progressive mesh technologies provide a mechanism to reduce the number of polygons in a given object in a controlled manner as a function of range to the viewpoint. LOD techniques replace highly detailed models with less detailed models as they move further from the eye. Progressive mesh, on the other hand, modifies a single mesh based on its range from the eye.

Note

Do not confuse game engine design with game design. The game engine is the enabling technology behind the game. Game design needs to take into account many issues that have nothing to do with the game engine. The game engine supports the game by providing the tools the game designer needs to translate a concept or storyline into a game.




Introduction to 3D Game Engine Design Using DirectX 9 and C#
Introduction to 3D Game Engine Design Using DirectX 9 and C#
ISBN: 1590590813
EAN: 2147483647
Year: 2005
Pages: 98

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net