Uncover the secrets of the game industry?s best programmers with the newest volume of the Game Programming Gems series. With over 60 all new techniques, Game Programming Gems 4 continues to be the definitive resource for developers. Written by expert game developers who make today?s amazing games, these articles not only provide quick solutions to cutting-edge problems, but they provide insights that you?ll return to again and again. They?ll spark your creativity and inspire your own discoveries. For the past few years, the game industry has been on an incredible journey of exploration and innovation. In conjunction with this journey, the scope of the Game Programming Gems series has broadened as well. With the variety of new platforms available, coverage has been expanded to include alternative languages and third party APIs. Most code is written in C++, but some interpreted languages (Java and Python) are also represented. The graphics articles make use of OpenGL, DirectX, and the various available shader languages. Volume 4 also includes an all new physics section that teaches innovative techniques for implementing real-time physics that will help you create emergent gameplay. To make searching between all four volumes of the series easy and efficient, we have added a cumulative index. This new volume is a definite must-have resource for every game programmer?s library! Section Editors: Chris Corry, General Programming Jonathan Blow, Mathematics Graham Rhodes, Physics Paul Tozour, Artificial Intelligence Alex Vlachos, Graphics Pete Isensee, Network & Multiplayer Eddie Edwards, Audio Section Highlights: General Programming: the science of debugging games, large cross-platform libraries, generic tree container in C++, weak references and null objects, system for managing game entities Mathematics: using the Mersenne Twister, extracting frustum and camera information, solving accuracy problems in large world coordinates, using the covariance matrix for better fitting bounding objects Physics (New): algorithms for combat killing, vehicle physics simulation for CPU-limited systems, constraints in rigid body dynamics, interactive water surfaces Artificial Intelligence: third-person camera navigation, using AI to enhance dramatic tension, NPC decision making, distributed-reasoning voting architecture Graphics: GPU shadow volume construction for non-closed meshes, perspective shadow maps, shadow buffers, motion capture data compression, terrain occlusion culling with horizons Network & Multiplayer: efficient MMP game state storage, application of parallel-state machines in a client-server environment, bit packing, time and consistency management for multi-server based MMORPGs Audio: introduction to OpenAL, real-time lip synching, dynamic variables and audio programming, controlling real-time sound synthesis from game physics On The CD-ROM The CD-ROM is packed with source code and listings from the book and demos to compliment the articles. Windows demos were compiled using Microsoft Visual C++ 6.0 (.dsw files) or Microsoft Visual C++ 7.0 (.sln files). OpenGL utility Toolkit (GLUT v3.7.6), Sun?s J2SE, and Microsoft DirectX 9 SDK are also included. System Requirements Windows�: Intel� Pentium� series, AMD Athlon or newer processor, Windows� 98 (64MB RAM) or Windows� 2000 (128MB RAM) or later required. 3D graphics card recommended for optimal performance. DirectX� 9 and GLUT 3.7 or newer are also required. For Linux systems you will also need the Linux kernel 2.4.x or later, XFree86 4.0, and OpenGL driver, glibc 2.1 or newer. Mesa can be used in place of 3D hardware support. CONTRIBUTORS Marwan Y. Ansari Jonathan Blow James Boer Paul Bragiel Warrick Buchanan Bill Budge Waldemar Celes Chris Corry Carsten Dachsbacher Mark DeLoura Shekhar Dhupelia Thomas Di Giacomo Michael Dougherty George Drettakis Eddie Edwards David Etherton Glenn Fiedler Peter Freese Bert Freudenberg Paul Glinker Mario Grimani John Hancock S�ren Hannibal Matthew Harmon Oliver Heim Jim Hejl Pete Isensee Toby Jones Andrew Kirmse Adam Lake Jay Lee Noel Llopis Thomas Lowe Frank Luchs Nadia Magnenat-Thalmann Carl S. Marshall Adam Martin Maic Masuch Dave McCoy �d�m Morav�nszky Frederic My Chris Oat James F. O'Brien John M. Olsen Marcin Pancewicz Kurt Pelzer Borut Pfeifer Kar�n Pivazyan Nick Porcino Mark T. Price Matt Pritchard Justin Quimby Steve Rabin Graham Rhodes Thomas Rolfes Greg Seegert Larry Shi Jake Simpson Roger Smith Russ Smith Marco Spoerl Marc Stamminger Jonathan Stone Don Stoner Thomas Strothotte Natalya Tatarchuk Pierre Terdiman Jerry Tessendorf Paul Tozour Joe Valenzuela Jim Van Verth Scott Velasquez Alex Vlachos Tao Zhang