Data Structures and Algorithms for Game Programming in C++
eBook - ePub

Data Structures and Algorithms for Game Programming in C++

Write high-performance code and solve game development challenges with expert-led C++ solutions

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Data Structures and Algorithms for Game Programming in C++

Write high-performance code and solve game development challenges with expert-led C++ solutions

About this book

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 Free with your book: DRM-free PDF version + access to Packt's next-gen Reader*

Key Features

  • Build real-time 2D and 3D games using C++ with practical, executable examples
  • Gain proficiency in game programming domains like AI pathfinding, camera systems, animation, and rendering effects
  • Boost runtime efficiency with object pooling, LOD patterns, and terrain partitioning to create smoother, more responsive gameplay systems
  • *Email sign-up and proof of purchase required

Book 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 learn

  • Use C++ data structures and algorithms to build core gameplay features
  • Implement 2D/3D rendering with shaders, particle effects, and terrain systems
  • Design camera systems like third-person, top-down, and split-screen views
  • Optimize performance using object pooling and LOD
  • Animate characters using skeletal rigging, interpolation, and inverse kinematics
  • Build game AI with FSMs, behavior trees, pathfinding, and steering
  • Apply neural network concepts in a turret defense project

Who 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.

]]>

Information

Year
2025
eBook ISBN
9781835889879

Table of contents

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

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Data Structures and Algorithms for Game Programming in C++ by Zhenyu George Li,Charles Shih-I Yeh in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Algorithms. We have over 1.5 million books available in our catalogue for you to explore.