Table of Contents
Acknowledgments
Introduction
Part I The Engine
1 Engine Design
The Importance of Design
Our Design Approach
Using Design Goals
Visual Design Aids
Defining the Engine
The Framework
Resources
Engine Control
Scripting
Rendering
Sound System
Networking
Game Objects
Scene Management
Using the D3DX Library
Summary
2 Framework
Setting Up DirectX
Using Header Files
The Virtual Destructor
Connecting the Engine Together
Memory Management
Engine Setup Structure
Communicating with Windows
The Engine Class
Making the Engine Global
Templates
Linked Lists
Resource Management
Geometry
Testing the Framework
Summary
3 Engine Control
What Is Engine Control?
Finite State Machines
Viewer Setup Structure
State System
Integrating the State System
Using the State System
User Input
Updating User Input
Retrieving Input
Integrating the Input System
Testing the State and Input System
Summary
4 Scripting
Benefits of Scripts
The Script System
Script Composition
Variable Class
Encapsulation and Automation
Script Class
The Resource Manager
Using the Script System
Summary
5 Rendering
Direct3D Rendering
The Device
Display Mode Structure
Display Adapter Enumeration
Enumerating Display Modes
Dialog Resources
Using Dialogs at Runtime
Integrating the Device Enumeration
New Engine Setup Properties
Engine Changes
Direct3D Device Creation
Integrating the Device
Fonts
Testing the Device
Summary
6 Sound
DirectMusic
The Sound System
3D Vectors
Sound Resource
Audio Paths
Integrating the Sound System
Testing the Sound System
Summary
7 Networking
Words of Warning
Networking with DirectPlay
Network Architecture
Messages
Players
Critical Sections
Globally Unique Identifiers
The Network System
Enumerating Sessions
Hosting and Joining Sessions
Sending and Receiving Messages
Processing Network Messages
Integrating the Network System
Testing the Network System
Summary
8 Materials and Meshes
Materials
Material Scripts
The Material System
Integrating the Material System
Bounding Volumes
X File Format
Matrices
Loading the Mesh Hierarchy
The Mesh System
Loading a Mesh
Updating and Rendering a Mesh
Integrating the Mesh System
The Render Cache
Testing the Materials and Meshes
Exercise
Summary
9 Objects
Using Objects
Object Movement
World Matrix
Scene Objects
Updating and Rendering Objects
Animated Objects
Spawner Objects
Integrating the Objects
Testing the Objects
Exercise
Summary
10 Scene Management
What Is Scene Management?
Culling
Rendering a Scene
Collision Detection
The View Frustum
Scene Face
Scene Leaf
Scene Occluder
Scene Scripts
Scene Mesh
Scene Management System
Loading the Scene
Updating and Rendering the Scene
Building Occlusion Volumes
Performing Culling
Integrating the Scene Management System
Testing the Scene Management System
Exercises
Summary
Part II The Game
11 Foundations
Game Design
Integrating the Engine
Initializing the Engine
Custom Game Material
The Menu State
Player Data
The Game State
Testing the Game
Summary
12 Players
Representing the Player
Player Scripts
Player Network Messages
The Player Object
Footsteps with Animation Keys
Updating the Player Object
The Player Manager
Updating the Players
Spawning Players
Handling Player Network Messages
Testing the Game
Summary
13 Weapons
Implementing Weapons
The Bullet Class
The Bullet Manager
Weapon Resources
The Weapon Class
Updating Weapons
Rendering Weapons
Collecting Weapons
Changing Weapons
Weapon Network Messages
Testing the Game
Expanding the Game
Summary
Appendix A: About the CD-ROM
Appendix B: Competition
Index
Copyright © by Code Red Games All Right Reserved.