Price: $49.99 - $44.99
(as of Nov 20, 2025 23:28:04 UTC – Details)
Learn C++ game programming through real-world demos of AI systems, animation, and rendering to build scalable, high-performance games using patterns you can reuse across any game engine
Key FeaturesBuild real-time 2D and 3D games using C++ with practical, executable examplesGain proficiency in game programming domains like AI pathfinding, camera systems, animation, and rendering effectsBoost runtime efficiency with practical techniques like object pooling, LOD patterns, and terrain partitioning to create smoother, more responsive gameplay systemsBook Description
Creating responsive, intelligent games takes more than just following engine tutorials. It requires solving real development challenges with practical, efficient code. This book bridges theory and practice with proven algorithms and techniques grounded in real-world production needs, emphasizing clean, portable C++ implementations.
Starting with raylib and the custom Knight engine layer, you’ll be introduced to a simple object-oriented scene and game object system. From there, you’ll build responsive gameplay systems using essential data structures and algorithms, progressing through 2D rendering, collision detection, effects, and camera control before advancing to 3D graphics environments built using shaders, lighting, quad-tree terrain, and dynamic camera setups.
You’ll animate characters using skeletal rigs, interpolation, and inverse kinematics for fluid movement and then develop game AI using FSMs, behavior trees, A* pathfinding, and steering behaviors. The book also covers neural networks, exploring their underlying theories, training processes, and tools. Throughout, the code is written in legacy-compatible C++ to ensure broad support across platforms and compilers.
By the end, you’ll have gained the skills to build game systems that not only work but also scale, perform, and adapt like professional-grade code.
What you will learnUse C++ data structures and algorithms to build core gameplay featuresImplement 2D/3D rendering with shaders, particle effects, and terrain systemsDesign camera systems like third-person, top-down, and split-screen viewsOptimize performance using object pooling and LODAnimate characters using skeletal rigging, interpolation, and inverse kinematicsBuild game AI with FSMs, behavior trees, pathfinding, and steeringApply neural network concepts in a turret defense projectWho this book is for
This book is for junior game developers, hobbyists, and computer science students entering game development, as well as C++ programmers looking to strengthen their skills. While some familiarity with C++ is helpful, the examples are explained step by step to remain approachable. Whether you’re starting out or reinforcing your skills before diving into game engines down the road, this book offers a clear and practical foundation to make you a more effective developer, regardless of which tools you choose later.
Table of ContentsGearing Up: C++ for Game DevelopmentData Structures in Action: Building Game FunctionalityAlgorithms Commonly Utilized in Game Development2D Rendering and EffectsThe Camera and Camera Controls3D Graphics RenderingRendering a 3D Game WorldAnimating Your CharactersBuilding AI Opponents Machine Learning Algorithms for Game AIContinuing Your Learning Journey
From the Publisher


Code smarter. Run faster. Build games that perform.
Practical C++ Game Programming with Data Structures and Algorithms is your hands-on guide to building real-time, high-performance games using modern C++. Master scene-based architecture, game loops, and modular systems with core data structures like arrays, stacks, and queues. Optimize gameplay with object pooling, A* pathfinding, procedural generation, and weighted randomness. Gain full control of the graphics pipeline with custom shaders, lighting, and quad-tree terrain rendering. Build smarter AI using FSMs, behavior trees, and neural networks that learn in-game. Every chapter includes fully playable, expandable demos using the lightweight Knight engine and raylib. Learn by doing, not just theory.
Develop the hands-on skills to overcome common game dev hurdles and deliver polished, high-performance results.
Struggling to manage hundreds of visual elements at once? This book teaches you how to use scene graph architecture to structure your visuals intelligently. Keep your render loop clean and your UI layers organized, no matter how complex your scene becomes.
Want your game to shimmer with magic, fire, snow, or explosions? Learn how to harness particle systems to produce spectacular effects that scale beautifully, perform well, and bring your game to life.
Struggling with 3D surfaces that look flat and lifeless? Discover how normal mapping can add depth, texture, and realism to your models without increasing polygon counts. Learn the technique used in top-tier games to deliver visual fidelity efficiently.
Too many trees tanking your performance? This book shows you how to use billboards to represent distant objects like grass and trees. Cut render times while keeping your environment lush and immersive.
Large terrains hurting your frame rate? You’ll learn how to apply quad-tree structures to render only what the camera sees, improving performance without sacrificing scale.
Need to randomly select exclusive options without looping forever? The book teaches a smarter exclusive selection algorithm so you can make instant, fair choices without burning CPU cycles.
Tired of inefficient or clunky shuffle logic? Discover a shuffling algorithm designed to minimize memory usage and keep operations fast — ideal for games with inventory systems, loot drops, or procedural content.
Highlights of the book


Performance-Driven Algorithms in Game Mechanics
Master performance-driven game mechanics by learning how to implement smart randomization with Fisher-Yates, build procedural mazes, and optimize memory with object pooling. These techniques make your games more responsive and efficient, which is especially important for real-time, mobile, and VR/AR experiences.


Advanced Rendering Pipeline & GPU Programming
Learn real-time rendering by working with shaders, transformations, lighting, and terrain generation. Build hands-on graphics features in C++ and gain practical experience with APIs like OpenGL and Vulkan for creating immersive 3D games.


Modern 3D Camera Techniques
Learn to build versatile camera systems including first-person, third-person, rail, top-down, and split-screen views. You’ll configure both perspective and orthographic projections and handle real-time switching between them. These skills are essential for creating immersive, responsive camera experiences across genres like FPS, RPG, and racing games.


Game Animation Systems with Skeletal Rigs & IK
Bring characters to life with keyframes, easing curves, quaternions, and matrix-based animation. Learn to implement inverse kinematics for natural joint movement and create smooth, responsive transitions between animation states. These techniques add realism and interactivity to modern 3D games.


AI Programming: FSMs, BTs, and A Pathfinding
Build smart NPCs using Finite State Machines, Behavior Trees, and A* pathfinding. Program realistic movement with steering behaviors and create AI that can adapt and make decisions in real time. These techniques are core to AI in games like RPGs, stealth titles, and tactical shooters.


Machine Learning for Game AI
Implement a neural network in C++ using forward propagation, backpropagation, and gradient descent to optimize AI behavior. Apply it in a fully playable turret defense system, bringing machine learning into real gameplay for smarter, adaptive agents.
ASIN : 1835889867
Publisher : Packt Publishing
Publication date : June 30, 2025
Language : English
Print length : 384 pages
ISBN-10 : 1835889875
ISBN-13 : 978-1835889879
Item Weight : 1.6 pounds
Dimensions : 7.5 x 0.96 x 9.25 inches
Best Sellers Rank: #483,111 in Books (See Top 100 in Books) #13 in Rendering & Ray Tracing #98 in C++ Programming Language #182 in Game Programming
Customer Reviews: 3.9 3.9 out of 5 stars 10 ratings var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });

