This video features an interview with Michael Dunsky, author of "Mastering C++ Game Animation Programming." The discussion delves into advanced game development concepts, particularly focusing on character animation within a C++ context. Dunsky explains the book's practical, hands-on approach to building a game-engine-like application, covering topics such as offloading animation calculations to the GPU using compute shaders, implementing visual selection and extended camera controls, handling configuration files, and integrating complex behaviors like collision detection, inverse kinematics, and AI navigation (A* algorithm). The book also explores creating immersive virtual worlds with sound and dynamic graphics. Dunsky emphasizes the use of modern C++ (C++17 and newer) and STL functions for robust and future-proof code. A live demo showcases many of the implemented features, highlighting the project's performance and portability across various platforms, including Linux and Raspberry Pi.
Mastering C++ Game Animation Programming: An Interview with Author Michael Dunsky
0:00 Author Introduction & Book Overview: Michael Dunsky, an experienced electronics technician and gameplay programmer, discusses his new book, "Mastering C++ Game Animation Programming." It's a follow-up to his first book, intended for developers ready to dive into advanced animation, assuming basic C++ and renderer knowledge.
2:40 Open Asset Import Library (Assimp): The book extensively uses Assimp for importing various 3D model formats, simplifying the process compared to handling multiple formats manually.
3:27 GPU Offloading: A core concept is moving animation calculations from the CPU to the GPU using compute shaders. This allows for pre-calculation and storage of animations on the GPU, enabling much faster memory lookups during replay.
4:46 Visual Selection & Editor-like Features: The book teaches how to implement visual selection of models by clicking, and then manipulating them (moving, rotating, scaling) directly with the mouse, mimicking features found in professional game engines.
8:15 Undo/Redo System: Implementing a simple undo/redo system is covered, improving user experience by allowing easy correction of actions within the editor.
9:46 Configuration File Handling: The book guides users on how to save and load the current state and configuration of their virtual world, enabling persistent work sessions.
10:54 Advanced Camera Handling: Different camera types are explored, including free camera, third-person, follow cam, and even a first-person camera that uses the selected model's bones, realistically reflecting character movement.
12:05 Animation Lookup Tables: Animations are pre-calculated and stored in GPU memory as lookup tables, prioritizing speed over space and leveraging modern GPUs' ample RAM.
12:57 Collision Detection: Introduces basic collision detection using a quadtree for broad-phase checks (2D bounding boxes) and bounding spheres for more precise narrow-phase detection between bones, with visual debugging tools.
14:39 Advanced Character Behaviors: Covers complex animation blending, including head and face animations (e.g., smiling, nodding, angry expressions) separate from body movements, using state machines and behavior trees for responsive NPCs.
15:35 Modern C++ Usage: The book emphasizes using C++17 or newer standards, leveraging STL functions like std::copy and std::find_if to write clean, robust, and future-proof code while avoiding older practices like macros.
16:12 Level Loading & Navigation: Explains how to load real game maps, implement character interaction with terrain (e.g., staying on ground using inverse kinematics for feet), and pathfinding using algorithms like A* for autonomous character movement.
17:37 Immersive World Elements: Details how to add sound (music, footsteps), control time-of-day changes, and implement fog effects to create a more immersive virtual world.
28:15 Live Demo of Code: Michael showcases his application featuring dynamic bounding box collisions, visual selection, undo/redo, a mini-map, gravity, and cloning of instances, all running efficiently.
34:15 Book Scope Limitations: The book focuses on using and animating models rather than creating them or implementing a full-fledged level editor, rigging, or comprehensive physics engine due to size constraints.
48:45 High Portability: The code is highly portable, running on Windows and Linux (including Raspberry Pi 400), supporting both OpenGL and Vulkan, and compatible with MSVC, Clang, and GCC compilers.
47:32 Availability & Discount: A demo executable of the final chapter's code is available for download, and discount codes for the book are mentioned.