Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Practical C++ Game Programming with Data Structures and Algorithms

You're reading from   Practical C++ Game Programming with Data Structures and Algorithms Write high-performance code and solve game development challenges with expert-led C++ solutions

Arrow left icon
Product type Paperback
Published in Jun 2025
Publisher Packt
ISBN-13 9781835889862
Length 408 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Zhenyu George Li Zhenyu George Li
Author Profile Icon Zhenyu George Li
Zhenyu George Li
Charles Shih-I Yeh Charles Shih-I Yeh
Author Profile Icon Charles Shih-I Yeh
Charles Shih-I Yeh
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Data Structure and Algorithm Fundamentals
2. Gearing Up: C++ for Game Development FREE CHAPTER 3. Data Structures in Action: Building Game Functionality 4. Algorithms Commonly Utilized in Game Development 5. Part 2: Graphics Algorithms in Practice
6. 2D Rendering and Effects 7. The Camera and Camera Controls 8. 3D Graphics Rendering 9. Rendering a 3D Game World 10. Part 3: Breathing Life into Your Games
11. Animating Your Characters 12. Building AI Opponents 13. Machine Learning Algorithms for Game AI 14. Part 4: Reflecting and Moving Forward
15. Continuing Your Learning Journey 16. Other Books You May Enjoy
17. Index

What this book covers

This book provides a comprehensive guide to practical game development with C++, focusing on the data structures and algorithms that power modern games. It begins by setting up the C++ development environment and introducing fundamental data structures for efficient game functionality. Readers will explore essential game algorithms, including randomization, sorting, procedural generation, and object pooling, followed by techniques for 2D and 3D rendering, camera controls, and character animation.

The book delves into AI programming, covering Finite State Machines (FSMs), behavior trees, steering behaviors, and A* pathfinding, and introduces modern AI techniques like neural networks and deep learning. Each chapter combines theoretical insights with practical C++ implementations, providing hands-on experience in building efficient, scalable, and intelligent game systems.

Below is a list of chapters with brief descriptions to give you a quick overview of the book’s structure and the key topics covered:

Chapter 1, Gearing Up: C++ for Game Development, introduces the book’s practical approach to learning game development algorithms with C++. It covers the importance of algorithms in creating efficient games, explains why C++ is the preferred language, and guides you through setting up your development environment. You’ll also get familiar with raylib and the Knight demo project, which will serve as a learning tool throughout the book.

Chapter 2, Data Structures in Action: Building Game Functionality, explores fundamental data structures like arrays, linked lists, stacks, and queues, demonstrating how they manage game data efficiently. You’ll learn how proper data organization affects game mechanics and performance. The chapter also explains how game screenshots are captured and processed to enhance visual output.

Chapter 3, Algorithms Commonly Utilized in Game Development, introduces essential algorithms, including randomization, selection, sorting, and procedural generation, and how they apply to real-world game mechanics. The chapter introduces object pooling for memory optimization and demonstrates how these algorithms improve task scheduling, animation processing, and performance.

Chapter 4, 2D Rendering and Effects, covers 2D rendering techniques that enhance both 2D and 3D games, including animations, color blending, and parallax scrolling. You’ll learn how to use N-patch textures for UI design and implement isometric map rendering to create visually engaging games.

Chapter 5, The Camera and Camera Controls, guides you to explore how camera systems shape player perception in 3D games, from first-person and third-person views to chase and rail cameras. The chapter also covers object culling for performance optimization and techniques for managing multiple split-screen cameras.

Chapter 6, 3D Graphics Rendering, dives into GPU programming and the graphics pipeline, covering vertex transformations, shading, and rasterization. You’ll learn about lighting models, point light attenuation, and normal mapping, which are essential for creating realistic 3D environments.

Chapter 7, Rendering a 3D Game World, introduces techniques for rendering large, immersive 3D worlds by combining billboard rendering, particle systems, and multi-pass rendering. The chapter also covers lighting, shadows, and environmental design to enhance the visual appeal of your game world.

Chapter 8, Animating Your Characters, explores keyframe animation, skeletal animation, and Inverse Kinematics (IK) to create smooth, natural character movements. You’ll learn how to animate characters dynamically using hierarchical bone structures and real-time joint calculations.

Chapter 9, Building AI Opponents, discovers AI techniques used to create intelligent game opponents, starting with FSMs for simple decision-making. The chapter introduces behavior trees for complex logic, steering algorithms for realistic movement, and A* pathfinding for strategic navigation.

Chapter 10, Machine Learning Algorithms for Game AI, introduces neural networks, deep learning, and reinforcement learning in game AI. You’ll gain hands-on experience by building a neural network-controlled turret defense system, showcasing the power of adaptive AI in games.

Chapter 11, Continuing Your Learning Journey, reflects on the key C++ game development concepts, data structures, algorithms, graphics, animation, and AI covered in the book. It emphasizes the importance of continuous learning and experimentation while offering guidance on what lies ahead in your game development journey.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime