Introduction to 3d game engine design using directx 9


















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. 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. 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 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. 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.

Return to Book Page. This tutorial goes through the requirements for a game engine and addresses those requirements using the applicable aspects of DirectX with C. Get A Copy. Paperback , pages.

Published August 22nd by Apress first published August 20th More Details Original Title. Other Editions 1. Friend Reviews. To see what your friends thought of this book, please sign up. Lists with This Book. This book is not yet featured on Listopia.

Add this book to your favorite list ». Community Reviews. Showing Average rating 2. Rating details. More filters. Sort order. Jun 23, Stefan rated it it was ok. Andrew Dunn rated it it was ok Jul 17, Matt Herb rated it liked it Dec 27, Robert Beveridge rated it really liked it Jan 17, These strings are used along with values from the face enumeration to construct each of the Sky Face members.

This ensures that the faces have the chance to free the textures and buffers as described earlier. The SkyBox object has several unique features that will not be found in any other object that will be rendered.

The viewpoint must always be in the center of the box; therefore the box must move as the camera moves. Even though the box is built with a finite size , it must appear to be a very long distance away. To give the illusion that the box is very far away, we will turn off writing to the Z-buffer. By doing this, everything else that is rendered will be drawn on top of the box and appear to be closer. The method begins by creating a world matrix for itself that is set to the identity matrix.

This ensures that the box whose vertices are all offset around a zero position is not translated from that position. Copying the camera s matrix and adjusting the position down slightly creates a view matrix. Experience has shown me that by adjusting the position down, we get a better-looking horizon than if we were dead center in the box.

These matrices are passed to the device, and the Z-buffer write enable flag is cleared in the render state so that the buffer will not be altered as we render the box. The culling in the render state is turned off by setting the state to None. Since we are only drawing the few faces that are in view, there is no sense having the device check for face culling. The pitch and heading of the camera are checked, and only the faces of the box that might be visible are rendered.

Once the faces have been rendered, the view matrix and Z-buffer render states are restored to their normal conditions.



0コメント

  • 1000 / 1000