Introduction


I have been educating myself about game design and 3D visualization for many years . My bookshelves are full of books on programming, game development, and the various graphical application programming interfaces (APIs). Many books have been written that explain every part of DirectX or OpenGL. Quite a few books are also dedicated to creating portions of a game using one or both of these technologies.

The book that I could never find was one on game engine design. I wanted an object-oriented, reusable package of software that was not tightly integrated to one particular game. I knew that I wasnt the only person interested in game engine design. I decided that, as I learned C# and managed DirectX 9 and ported my game engine to this new technology, I would document the process. The fact that you are reading this indicates you share my interest in 3D game engines.

I have kept this book at an introductory level. When I initially began planning the book, I considered including more advanced topics such as animation, networking for multiplayer capability, and the programmable pipeline (shaders). I quickly came to the conclusion that to cover that much material in any depth at all was too much for a single book. I am hoping that at some point in the future I will have the time to do a follow-up volume that includes these and other more advanced areas.

No one book can answer all questions. I encourage you to extend your research to other books and the Internet as you hone your development capabilities. The best resources for getting your questions answered are the Microsoft DirectX newsgroups. There are a number of newsgroups of interest that are prefixed with microsoft.public.win32.programmer.directx. The newsgroup dedicated to Managed DirectX is microsoft.public.win32.programmer.directx.managed. I often monitor this newsgroup, and I will answer any questions that I can.

Chapter 1 : Overview

This chapter looks at several types of game engines as well as the distinction between a game and a game engine. Game engine design requires more thought than do hard-coding rendering and game logic within the game itself. The benefit is greater reuse of the underlying technology and a cleaner overall design.

Chapter 2 : User Interface

A games user interface provides the means of giving the player information and obtaining the players commands. This chapter investigates the presentation of splash screens, option screens, and a console screen. It also looks at the use of Directlnput to obtain player inputs from the keyboard, mouse, and joysticks.

Chapter 3 : Hanging Ten: A Ride Through the Rendering Pipeline

Before diving into the actual rendering of three-dimensional objects, it is good to have a basic understanding of the rendering pipeline. This chapter walks you through the typical steps involved in the fixed-function rendering pipeline. This includes the manipulation of cameras to provide the viewpoint in the game. It also describes a base class that will be used for all rendered objects. The process of culling objects and other techniques for improving performance is also investigated. The actual illustration of these steps appears in Chapters 4 through 8.

Chapter 4 : Basic 3D Objects

This chapter is the first of two chapters dealing with rendering the various types of objects that are used within a game. These objects include a skybox for providing a view into the distance, terrain rendering to provide a surface to move upon, billboards for simple symmetrical objects, and particle systems. Particle systems are an extremely powerful tool that may be used for dynamic systems of small objects. These include flowing water, fire, fireworks, and blowing sand.

Chapter 5 : Complex 3D Objects

Chapter 5 is the second chapter dedicated to the rendering of objects for games . The objects described in this chapter are much more complex, with many polygons per object. These are referred to as mesh objects and are used as the primary moving models within a game. The class used to encapsulate meshes includes the capability to adjust the complexity of the mesh as a function of range from the camera to improve performance.

Chapter 6 : Camera: The Players View of the World

To control the view of the action, we need something akin to the cameras used to film a movie. This chapter illustrates the design and use of a camera class that may be employed in a variety of ways. Cameras may be positioned at static locations within the scene and follow objects as they move past or they may be attached to the moving objects themselves . Employing multiple cameras and including logic within a game can provide a cinematic flair to the game.

Chapter 7 : Adding Some Atmosphere: Lighting and Fog

All of the rendering performed by the game engine up until this point has been under fully lit and crystal-clear conditionsconditions that are often hard to find in the real world. This chapter explores the four types of lights that may be used to illuminate a scene as well as how to configure fog to improve the realism of a game. Fog may also be used to disguise shortcomings in the ability to render objects at a large distance from the camera.

Chapter 8 : Artificial Intelligence: Adding the Competition

Few games are much fun without opponents. Although it is possible to write games that are strictly multiplayer, in which all of the opponents are human, networking is out of the scope of this book. Instead, we will look at the different types of artificial intelligence techniques that can be used within a game. One of these methods will be developed as part of the sample game engine for the book.

Chapter 9 : Game Audio: Lets Make Some Noise

Another method to add character to a game is through the use of audio. Background music, if chosen properly, adds mood to the play. This chapter shows you how to develop classes for the game engine that facilitate playing songs. It also includes support for sound effects within a game. Players expect certain sounds to coincide with events within a game. If a car hits another car or a tree, they expect to hear the crash as well as see a reaction between the objects involved in the collision.

Chapter 10 : Game Physics: Keeping It Real

As I mentioned when talking about audio, players not only expect to hear noise in a collision, but also to see a more physical reaction. Chapter 10 concentrates on the physics involved primarily with cars. The basic mathematics applied to cars may also be applied to many types of moving objects. This chapter also covers the physics used for cloth dynamics. This type of physics is used for not only cloth, but also for many types of flexible objects such as hair or rope.

Chapter 11 : Tools of the Trade

The final chapter of the book looks at a cross-section of tools that are used during game development. If you are just starting out in game development (or just starting out with C#), you may find it useful to check out this chapter before diving into the rest of the book. The first portion of this chapter concentrates on the development environment used to compile and test your software. Other topics covered in the chapter include the manipulation of the artistic content for the game. The artistic content includes the audio files, two-dimensional images, and three-dimensional models.




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