"... this book is the best of its kind, and you're lucky to have found it. It covers the huge field of game engine architecture in a succinct, clear way, and expertly balances the breadth and depth of its coverage, offering enough detail that even a beginner can easily understand the concepts it presents. The author, Jason Gregory, is not only a world expert in his field; he's a working programmer with production-quality knowledge and many shipped game projects under his belt. ... Jason is also an experienced educator who has taught in the top-ranked university game program in North America. ... the many detailed code samples and implementation examples in this book will help you understand just how the pieces come together in a great game. By helping you in this way, Jason's book might just empower you to outstrip even the most audacious dreams of history's best game designers and developers." -From the Foreword by Richard Lemarchand Praise for the First Edition: A 2010 CHOICE Outstanding Academic Title "This course resource provides an excellent, comprehensive look at every major system and issue related to modern game development ... a must-have textbook for computer science, software engineering, or game programming majors, amateur hobbyists, game 'modders,' and game developers." -A. Chen, CHOICE, January 2010 "... it looks like most of the critical areas and concepts are touched on. ... it looks like you'll have some reasonably deep understanding of the elements that go into making a game engine. Quite an impressive work, and I know of nothing else in this area that is so detailed." -Eric Haines, www.realtimerendering.com/blog/, July 2009 "Jason Gregory draws upon his many years of experience and expertise to create a complete and comprehensive textbook on the theory and practice of game engine software development. Informed and informative, replete with examples for every aspect of the game development process, and fully accessible to aspiring game engine developers as well as a very useful reference for even experienced technicians in the field, Game Engine Architecture is an invaluable, thoroughly `user friendly,' and highly recommended core addition to personal, professional, and academic Computer Science reference and resource collections in general, as well as gaming engine design instructional reading lists in particular." -The Midwest Book Review, September 2009 "The book contains a huge amount of data on specifics to consider when developing a game engine." -Gamasutra.com, November 2009 "Game Engine Architecture by Jason Gregory has been named a finalist for the Game Developer's 2009 Front Line Award." -PR Newswire, December 2009
Foundations Introduction Structure of a Typical Game Team What Is a Game? What Is a Game Engine? Engine Differences across Genres Game Engine Survey Runtime Engine Architecture Tools and the Asset Pipeline Tools of the Trade Version Control Microsoft Visual Studio Profiling Tools Memory Leak and Corruption Detection Other Tools Fundamentals of Software Engineering for Games C++ Review and Best Practices Data, Code and Memory Catching and Handling Errors Pipelines, Caches and Optimization 3D Math for Games Solving 3D Problems in 2D Points and Vectors Matrices Quaternions Comparison of Rotational Representations Other Useful Mathematical Objects Hardware-Accelerated SIMD Math Random Number Generation Low-Level Engine Systems Engine Support Systems Subsystem Start-Up and Shut-Down Memory Management Containers Strings Engine Configuration Resources and the File System File System The Resource Manager The Game Loop and Real-Time Simulation The Rendering Loop The Game Loop Game Loop Architectural Styles Abstract Timelines Measuring and Dealing with Time Multiprocessor Game Loops Networked Multiplayer Game Loops Human Interface Devices (HID) Types of Human Interface Devices Interfacing with a HID Types of Inputs Types of Outputs Game Engine HID Systems Human Interface Devices in Practice Tools for Debugging and Development Logging and Tracing Debug Drawing Facilities In-Game Menus In-Game Console Debug Cameras and Pausing the Game Cheats Screenshots and Movie Capture In-Game Profiling In-Game Memory Stats and Leak Detection Graphics, Motion and Sound The Rendering Engine Foundations of Depth-Buffered Triangle Rasterization The Rendering Pipeline Advanced Lighting and Global Illumination Visual Effects and Overlays Further Reading Animation Systems Types of Character Animation Skeletons Poses Clips Skinning and Matrix Palette Generation Animation Blending Post-Processing Compression Techniques Animation System Architecture The Animation Pipeline Action State Machines Animation Controllers Collision and Rigid Body Dynamics Do You Want Physics in Your Game? Collision/Physics Middleware The Collision Detection System Rigid Body Dynamics Integrating a Physics Engine into Your Game Advanced Physics Features Audio The Physics of Sound The Mathematics of Sound The Technology of Sound Rendering Audio in 3D Audio Engine Architecture Game-Specific Audio Features Gameplay Introduction to Gameplay Systems Anatomy of a Game World Implementing Dynamic Elements: Game Objects Data-Driven Game Engines The Game World Editor Runtime Gameplay Foundation Systems Components of the Gameplay Foundation System Runtime Object Model Architectures World Chunk Data Formats Loading and Streaming Game Worlds Object References and World Queries Updating Game Objects in Real Time Events and Message-Passing Scripting High-Level Game Flow Conclusion You Mean There's More? Some Engine Systems We Didn't Cover Gameplay Systems Bibliography Index