did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9781556227219

Advanced 3-D Game Programming With Directx 7.0

by ;
  • ISBN13:

    9781556227219

  • ISBN10:

    1556227213

  • Format: Paperback
  • Copyright: 2000-07-01
  • Publisher: Natl Book Network
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $59.95

Summary

This latest addition to the Wordware Game Developer's Library describes how to create computer games with cutting-edge 3-D algorithms and effects. "Advanced 3-D Game Programming Using DirectX 7.0" is intended specifically for those who know how to program with C++ but have not yet explored game or graphics programming. The authors include coverage of artificial intelligence, client-server networking using UDP, multi-texture effects, multi-resolution surface techniques, alpha blending, and more. Along with several sample applications that target specific algorithms, full source code is provided for a client-server networked 3-D first-person game that demonstrates many of the techniques discussed in the book, while giving the reader the opportunity to make their own additions. The CD includes: Full source code in C++, including a complete game demonstrating techniques covered in the bookMicrosoft's DirectX 7a SDKSource code to other 3-D engines, including Quake, GL Quake, Quakeworld, Descent 1, Descent 2, Golgotha, and Crystal SpaceSelect articles on advanced gaming topics contributed by members of the graphics and game programming industryPaint Shop Pro evaluation edition for making texturesAdrian Perez, also known as [Cuban] in the computer game industry, has worked on the Direct3D team at Microsoft and in the graphics department at Lucent. He is a computer science major at Carnegie Mellon University in Pittsburgh, and a contributor to Game Developer magazine. Dan Royer is a developer at 3D Ion, a 3-D graphics company in Israel, and a contributor to flipcode.com, an online game programming news site.

Table of Contents

Acknowledgments xiv
Introduction xv
Windows
1(34)
A Word About Windows
1(1)
Hungarian Notation
2(1)
General Windows Concepts
3(2)
Message Handling in Windows
5(2)
Explaining Message Processing
5(2)
Hello World---Windows Style
7(8)
Explaining the Code
9(2)
Registering Our Application
11(1)
Initializing Our Window
11(3)
WndProc---The Message Pump
14(1)
Manipulating Window Geometry
15(2)
Important Window Messages
17(4)
MFC
21(2)
Class Encapsulation
23(7)
COM: The Component Object Model
30(3)
References
33(1)
For Further Reading
33(2)
DirectX---The Basic Components
35(104)
What is DirectX?
35(1)
Installation
36(1)
Setting up VC
36(2)
DirectDraw
38(50)
2-D Graphics---A Primer
39(4)
Surfaces
43(1)
Complex Surfaces
44(1)
Describing Surfaces
45(5)
The IDirectDrawSurface7 Interface
50(1)
Surface Operations
51(2)
Surfaces and Memory
53(1)
Modifying the Contents of Surfaces
53(1)
Drawing on Surfaces with GDI
54(1)
The DirectDraw Object
55(1)
Windowed vs. Full-screen
56(1)
The DirectDraw Interface
57(1)
Creating DirectDraw Surfaces
58(1)
DirectDraw Device Capabilities
58(1)
Implementing DirectDraw with cGraphicsLayer
59(7)
Creating the Graphics Layer
66(1)
Enumerating DirectDraw Devices
67(2)
Full-screen Initialization
69(6)
Windowed Initialization
75(6)
Shutting Down DirectDraw
81(1)
Changes to cApplication
81(4)
Application: DirectDraw Sample
85(3)
DirectInput
88(23)
Why Should We Use DirectInput?
88(1)
Devices
89(1)
Receiving Device States
90(3)
Cooperative Levels
93(1)
Application Focus and Devices
94(1)
The DirectInput Object
94(1)
Implementing DirectInput with clnputLayer
95(15)
Additions to cApplication
110(1)
DirectSound
111(27)
The Essentials of Sound
111(2)
DirectSound Concepts
113(1)
DirectSound Buffers
113(3)
Operations on Sound Buffers
116(4)
Loading WAV Files
120(1)
Implementing DirectSound with cSoundLayer
121(1)
Creating the DirectSound Object
121(1)
Setting the Cooperative Level
122(1)
Grabbing the Primary Buffer
123(4)
The cSound Class
127(6)
Additions to cApplication
133(1)
Application: DirectSound Sample
133(5)
References
138(1)
For Further Reading
138(1)
3-D Math Foundations
139(94)
Points
139(15)
The point3 Structure
143(1)
Basic point3 Functions
144(1)
Assign
144(1)
Mag and MagSquared
145(1)
Normalize
145(1)
Dist
146(1)
point3 Operators
146(1)
Addition/Subtraction
146(2)
Vector-scalar Multiplication/Division
148(1)
Vector Equality
149(2)
Dot Product
151(2)
Cross Product
153(1)
Polygons
154(3)
Triangles
157(3)
Strips and Fans
158(2)
Planes
160(12)
Defining Locality with Relation to a Plane
163(3)
Back-face Culling
166(1)
Clipping Lines
167(1)
Clipping Polygons
168(4)
Object Representations
172(2)
Transformations
174(23)
Matrices
175(11)
The matrix4 Structure
186(3)
Translation
189(1)
Basic Rotations
189(2)
Axis-Angle Rotation
191(2)
The LookAt Matrix
193(2)
Perspective Projection Matrix
195(1)
Inverse of a Matrix
196(1)
Collision Detection with Bounding Spheres
197(2)
Lighting
199(12)
Representing Color
200(2)
Lighting Models
202(2)
Specular Reflection
204(1)
Light Types
205(1)
Parallel Lights (or Directional Lights)
205(1)
Point Lights
206(1)
Spot Lights
207(1)
Shading Models
208(1)
Lambert
209(1)
Gourad
209(1)
Phong
210(1)
BSP Trees
211(20)
BSP Tree Theory
212(1)
BSP Tree Construction
213(5)
BSP Tree Algorithms
218(1)
Sorted Polygon Ordering
218(1)
Testing Locality of a Point
219(1)
Testing Line Segments
220(1)
BSP Tree Code
220(11)
Wrapping It Up
231(1)
References
232(1)
For Further Reading
232(1)
Artificial Intelligence
233(44)
Starting Point
234(1)
Locomotion
234(1)
Steering---Basic Algorithms
235(2)
Chasing
235(1)
Evading
236(1)
Pattern-based Al
236(1)
Steering---Advanced Algorithms
237(18)
Potential Functions
238(2)
The Good
240(1)
The Bad
240(1)
Application: potentialFunc
241(2)
Path Following
243(1)
Groundwork
244(2)
Graph Theory Done Really, Really Quickly
246(3)
Using Graphs to Find Shortest Paths
249(2)
Application: Path Planner
251(4)
Motivation
255(20)
Non-Deterministic Finite Automata (NFAs)
255(3)
Genetic Algorithms
258(1)
Rule-Based Al
259(1)
Neural Networks
260(1)
A Basic Neuron
261(2)
Simple Neural Networks
263(2)
Training Neural Networks
265(1)
Using Neural Networks in Games
266(1)
Application: NeuralNet
266(9)
Some Closing Thoughts
275(1)
Works Cited
276(1)
For Further Reading
276(1)
UDP Networking
277(46)
Terminology
277(5)
Endianness
277(2)
Network Models
279(1)
Protocols
280(1)
Packets
281(1)
The Right Tool for the Job (aka ``DirectPlay and why we're not using it'')
281(1)
Implementation I: MTUDP
282(1)
Design Considerations
282(1)
Things that go ``aurgh, my kidney!'' in the night
282(2)
Mutexes
284(2)
Threads, Monitor, and the Problem of the try/throw/catch Construction
286(1)
MTUDP: The Early Years
286(7)
MTUDP::Startup() and MTUDP::Cleanup()
287(1)
MTUDP::MTUDP() and MTUDP::∼MTUDP()
288(1)
MTUDP::StartListening()
289(1)
MTUDP::StartSending()
290(1)
MTUDP::ThreadProc()
290(2)
MTUDP::ProcessIncomingData()
292(1)
MTUPD::GetReliableData()
293(1)
MTUDP::ReliableSendTo()
293(1)
cDataPacket
293(1)
cQueueln
294(2)
cHost
296(11)
MTUDP::ReliableSendTo()
300(7)
cUnreliableQueueln
307(1)
cUnreliableQueueOut
308(5)
cHost::AddACKMessage() / cHost::ProcessIncomingACKs()
308(5)
cNetClock
313(3)
Implementation 2: Smooth Network Play
316(5)
Geographic and Temporal Independence
316(1)
Timing is Everything
317(1)
Pick and Choose
318(1)
Prediction and Extrapolation
319(2)
Conclusion
321(2)
Beginning Direct3D---Immediate Mode
323(84)
Introduction to D3D
323(1)
The Direct3D7 Object
324(1)
The Direct3DDevice7 Object
325(16)
Device Semantics
326(1)
Device Types
326(1)
HAL
326(1)
TnLHal
327(1)
RGB
328(1)
RefRast
328(1)
Ramp (and Other Legacy Devices)
329(1)
Determining Device Capabilities
329(3)
The D3DPRIMCAPS Structure
332(2)
Setting Device Render States
334(7)
Fundamental Direct3D Structures
341(2)
D3DCOLOR
341(1)
D3DCOLORVALUE
342(1)
D3DVECTOR
343(1)
D3DMATRIX
343(1)
The Depth Problem (and How Direct3D Solves It)
343(5)
W-Buffering
346(1)
Enumerating Z-buffer Formats
347(1)
Stencil Buffers
348(1)
Vertex Buffers
348(6)
Texture Mapping
354(1)
Materials and Lights
354(6)
Using Lights
354(2)
D3D Lighting Semantics
356(1)
The sLight Helper Class
357(1)
Using Materials
358(1)
D3D Material Semantics
359(1)
The sMaterial Helper Class
360(1)
The Geometry Pipeline
360(3)
Clipping and Viewports
362(1)
Fog
363(3)
Vertex-based Fog
364(1)
Pixel-based Fog
364(1)
Using Fog
365(1)
Drawing with the Device
366(13)
Direct3D Vertex Structures
367(1)
D3DVERTEX
367(1)
D3DLVERTEX
368(1)
D3DTLVERTEX
369(1)
Flexible Vertex Format Flags
370(3)
Strided Vertex Data
373(1)
Primitive Types
374(1)
The DrawPrimitive Functions
375(1)
DrawPrimitive
375(1)
DrawPrimitiveStrided
375(1)
DrawPrimitiveVB
376(1)
DrawIndexedPrimitive
376(1)
DrawIndexedPrimitiveStrided
377(1)
DrawIndexedPrimitiveVB
378(1)
Adding Direct3D to the Graphics Layer
379(14)
Direct3D Initialization
379(1)
Acquire an IDirect3D7 Interface from Our IDirectDraw7 Interface
380(1)
Enumerate and Confirm Devices
380(4)
Enumerate Z-buffer Formats and Build the Z-buffer
384(4)
Create a Device and Attach It to the Back Buffer
388(1)
Create a Viewport and Projection Matrix
388(1)
Putting It All Together
389(3)
Resizing Worries
392(1)
Further Additions to the GameLib
393(1)
The D3DX Library
394(1)
Application: D3D View
395(12)
The .o3d Format
395(1)
The cModel Class
396(11)
Advanced 3-D Programming
407(72)
Animation using Hierarchical Objects
407(10)
Forward Kinematics
409(2)
Inverse Kinematics
411(3)
Application: InvKim
414(3)
Parametric Curves and Surfaces
417(22)
Bezier Curves and Surfaces
417(1)
Bezier Concepts
417(3)
The Math
420(2)
Finding the Basis Matrix
422(1)
Calculating Bezier Curves
423(2)
Forward Differencing
425(4)
Drawing Curves
429(1)
Drawing Surfaces
430(1)
Application: Teapot
431(5)
B-Spline Curves
436(2)
Application: BSpline
438(1)
Subdivision Surfaces
439(20)
Subdivision Essentials
440(2)
Triangles vs. Quads
442(1)
Interpolating vs. Approximating
442(1)
Uniform vs. Non-Uniform
442(1)
Stationary vs. Non-Stationary
443(1)
Modified Butterfly Method Subdivision Surfaces
443(3)
Application: SubDiv
446(13)
Progressive Meshes
459(7)
Progressive Mesh Basics
460(1)
Choosing Our Edges
461(1)
Stan Melax's Edge Selection Algorithm
462(1)
Quadric Error Metrics
462(2)
Implementing a Progressive Mesh Renderer
464(2)
Radiosity
466(10)
Radiosity Foundations
467(3)
Progressive Radiosity
470(1)
The Form Factor
470(2)
Application: Radiosity
472(4)
References
476(1)
For Further Reading
477(2)
Advanced Direct3D
479(88)
Alpha Blending
479(4)
The Alpha Blending Equation
480(1)
A Note on Depth Ordering
481(1)
Enabling Alpha Blending
481(1)
Blending Modes
481(2)
Texture Mapping 101
483(25)
Fundamentals
484(2)
Affine Versus Perspective Mapping
486(1)
Texture Addressing
487(1)
Wrap
487(1)
Mirror
488(1)
Clamp
488(1)
Border Color
489(1)
Texture Wrapping
490(1)
Texture Aliasing
490(2)
MIP Maps
492(1)
Filtering
493(1)
Point Sampling
493(1)
Bilinear Filtering
494(1)
Trilinear Filtering
495(1)
Anisotropic Filtering
496(1)
Textures in Direct3D
497(1)
Texture Management
497(2)
Texture Loading
499(1)
DDS Format
499(1)
The cTexture Class
499(9)
Activating Textures
508(1)
Texture Mapping 202
508(52)
Multiple Textures Per Primitive
509(9)
Texture Transforms
518(1)
Effects Using Multiple Textures
519(1)
Light Maps (a.k.a. Dark Maps)
520(2)
Environment Maps
522(1)
Spherical Environment Maps
522(3)
Cubic Environment Maps
525(4)
Specular Maps
529(1)
Detail Maps
530(5)
Application: Detail
535(1)
Glow Maps
536(2)
Gloss Maps
538(2)
Other Effects
540(1)
Application: MultiTex
540(1)
Pass 1: Base Map
540(2)
Pass 2: Detail Map
542(2)
Pass 3: Glow Map
544(3)
Pass 4: Environment Map
547(3)
Pass 5: Gloss Map
550(4)
Pass 6: Cloud Map
554(2)
Putting Them All Together
556(2)
A General Purpose Shader Library
558(2)
Using the Stencil Buffer
560(4)
Overdraw Counter
562(1)
Dissolves and Wipes
563(1)
Stencil Shadows and Stencil Mirrors
564(1)
Validating Device Capabilities with ValidateDevice()
564(2)
For Further Reading
566(1)
Scene Management
567(30)
The Scene Management Problem
567(1)
Solutions to the Scene Management Problem
568(20)
Quadtrees/Octrees
569(1)
Portal Rendering
570(1)
Portal Rendering Concepts
571(7)
Exact Portal Rendering
578(2)
Approximative Portal Rendering
580(1)
Portal Effects
580(1)
Mirrors
580(3)
Translocators and Non-Euclidean Movement
583(2)
Portal Generation
585(1)
Precalculated Portal Rendering (PVS)
586(1)
Advantages/Disadvantages
587(1)
Implementation Details
587(1)
Application: Mobots Attack!
588(7)
Interobject Communication
588(4)
Network Communication
592(3)
Code Structure
595(1)
For Further Reading
595(1)
Closing Thoughts
595(2)
Appendix A An STL Primer 597(6)
Templates
597(1)
Containers
598(2)
Iterators
600(2)
Functors
602(1)
STL Resources
602(1)
Index 603

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program