Table of contents : Cover......Page 1 Half Title......Page 2 Title Page......Page 4 Copyright Page......Page 5 Dedication......Page 6 Table of Contents......Page 8 Preface......Page 14 I Foundations......Page 20 1 Introduction......Page 22 1.1 Structure of a Typical Game Team......Page 24 1.2 What Is a Game?......Page 27 1.3 What Is a Game Engine?......Page 30 1.4 Engine Differences across Genres......Page 32 1.5 Game Engine Survey......Page 50 1.6 Runtime Engine Architecture......Page 57 1.7 Tools and the Asset Pipeline......Page 78 2.1 Version Control......Page 88 2.2 Compilers, Linkers and IDEs......Page 97 2.3 Profiling Tools......Page 118 2.4 Memory Leak and Corruption Detection......Page 120 2.5 Other Tools......Page 121 3.1 C++ Review and Best Practices......Page 124 3.2 Catching and Handling Errors......Page 138 3.3 Data, Code and Memory Layout......Page 150 3.4 Computer Hardware Fundamentals......Page 183 3.5 Memory Architectures......Page 200 4 Parallelism and Concurrent Programming......Page 222 4.1 Defining Concurrency and Parallelism......Page 223 4.2 Implicit Parallelism......Page 230 4.3 Explicit Parallelism......Page 244 4.4 Operating System Fundamentals......Page 249 4.5 Introduction to Concurrent Programming......Page 275 4.6 Thread Synchronization Primitives......Page 286 4.7 Problems with Lock-Based Concurrency......Page 300 4.8 Some Rules of Thumb for Concurrency......Page 305 4.9 Lock-Free Concurrency......Page 308 4.10 SIMD/Vector Processing......Page 350 4.11 Introduction to GPGPU Programming......Page 367 5.1 Solving 3D Problems in 2D......Page 378 5.2 Points and Vectors......Page 379 5.3 Matrices......Page 394 5.4 Quaternions......Page 413 5.5 Comparison of Rotational Representations......Page 422 5.6 Other Useful Mathematical Objects......Page 426 5.7 Random Number Generation......Page 431 II Low-Level Engine Systems......Page 434 6.1 Subsystem Start-Up and Shut-Down......Page 436 6.2 Memory Management......Page 445 6.3 Containers......Page 460 6.4 Strings......Page 475 6.5 Engine Configuration......Page 489 7 Resources and the File System......Page 500 7.1 File System......Page 501 7.2 The Resource Manager......Page 512 8.1 The Rendering Loop......Page 544 8.2 The Game Loop......Page 545 8.3 Game Loop Architectural Styles......Page 548 8.4 Abstract Timelines......Page 551 8.5 Measuring and Dealing with Time......Page 553 8.6 Multiprocessor Game Loops......Page 563 9.1 Types of Human Interface Devices......Page 578 9.2 Interfacing with a HID......Page 580 9.3 Types of Inputs......Page 582 9.4 Types of Outputs......Page 588 9.5 Game Engine HID Systems......Page 589 9.6 Human Interface Devices in Practice......Page 606 10.1 Logging and Tracing......Page 608 10.2 Debug Drawing Facilities......Page 613 10.3 In-Game Menus......Page 620 10.4 In-Game Console......Page 623 10.5 Debug Cameras and Pausing the Game......Page 624 10.7 Screenshots and Movie Capture......Page 625 10.8 In-Game Profiling......Page 627 10.9 In-Game Memory Stats and Leak Detection......Page 634 III Graphics, Motion and Sound......Page 638 11 The Rendering Engine......Page 640 11.1 Foundations of Depth-Buffered Triangle Rasterization......Page 641 11.2 The Rendering Pipeline......Page 686 11.3 Advanced Lighting and Global Illumination......Page 716 11.4 Visual Effects and Overlays......Page 729 11.5 Further Reading......Page 738 12.1 Types of Character Animation......Page 740 12.2 Skeletons......Page 746 12.3 Poses......Page 748 12.4 Clips......Page 753 12.5 Skinning and Matrix Palette Generation......Page 769 12.6 Animation Blending......Page 774 12.7 Post-Processing......Page 793 12.8 Compression Techniques......Page 796 12.9 The Animation Pipeline......Page 803 12.10 Action State Machines......Page 805 12.11 Constraints......Page 825 13 Collision and Rigid Body Dynamics......Page 836 13.1 Do You Want Physics in Your Game?......Page 837 13.2 Collision/Physics Middleware......Page 842 13.3 The Collision Detection System......Page 844 13.4 Rigid Body Dynamics......Page 873 13.5 Integrating a Physics Engine into Your Game......Page 911 13.6 Advanced Physics Features......Page 928 14 Audio......Page 930 14.1 The Physics of Sound......Page 931 14.2 The Mathematics of Sound......Page 943 14.3 The Technology of Sound......Page 960 14.4 Rendering Audio in 3D......Page 974 14.5 Audio Engine Architecture......Page 993 14.6 Game-Specific Audio Features......Page 1014 IV Gameplay......Page 1032 15 Introduction to Gameplay Systems......Page 1034 15.1 Anatomy of a Game World......Page 1035 15.2 Implementing Dynamic Elements: Game Objects......Page 1040 15.3 Data-Driven Game Engines......Page 1043 15.4 The Game World Editor......Page 1044 16.1 Components of the Gameplay Foundation System......Page 1058 16.2 Runtime Object Model Architectures......Page 1062 16.3 World Chunk Data Formats......Page 1081 16.4 Loading and Streaming Game Worlds......Page 1088 16.5 Object References and World Queries......Page 1098 16.6 Updating Game Objects in Real Time......Page 1105 16.7 Applying Concurrency to Game Object Updates......Page 1120 16.8 Events and Message-Passing......Page 1133 16.9 Scripting......Page 1153 16.10 High-Level Game Flow......Page 1176 V Conclusion......Page 1178 17.1 Some Engine Systems We Didn’t Cover......Page 1180 17.2 Gameplay Systems......Page 1181 Bibliography......Page 1186 Index......Page 1190