Li / Zhao / Yeh | Practical C++ Game Programming with Data Structures and Algorithms | E-Book | www2.sack.de
E-Book

E-Book, Englisch, 428 Seiten

Li / Zhao / Yeh Practical C++ Game Programming with Data Structures and Algorithms

Write high-performance code and solve game development challenges with expert-led C++ solutions
1. Auflage 2025
ISBN: 978-1-83588-987-9
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection

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

E-Book, Englisch, 428 Seiten

ISBN: 978-1-83588-987-9
Verlag: De Gruyter
Format: EPUB
Kopierschutz: 0 - No protection



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.

Li / Zhao / Yeh Practical C++ Game Programming with Data Structures and Algorithms jetzt bestellen!

Weitere Infos & Material


Contents


  1. Preface
    1. Who this book is for
    2. Understanding the code samples in this book
    3. What this book covers
    4. To get the most out of this book
    5. Acknowledgment of art and content contributions
    6. Get in touch
    7. Download a Free PDF Copy of This Book
  2. Part 1: Data Structure and Algorithm Fundamentals
  3. Gearing Up: C++ for Game Development
    1. Technical requirements
    2. Why learn algorithms for game development?
    3. Why is C++ used in this book?
    4. Understanding the structure for introducing algorithms in this book
    5. Setting up your development environment
      1. Install Visual Studio 2022
      2. Downloading the Knight solution from GitHub
    6. Utilizing the raylib graphics library
    7. Introducing Knight
      1. What’s new in Knight?
      2. Introducing the game flow structure
      3. Introducing Scene, SceneObject, and Components
    8. Investigating Demo1.cpp
      1. Implementing the main() function
      2. Overriding the Knight::Start() function
      3. Overriding the Knight::Update() function
    9. Summary
  4. Data Structures in Action: Building Game Functionality
    1. Technical requirements
    2. Data structures and algorithms in games
    3. Deciphering the secrets of game screenshots
      1. Common entities found in video games
      2. Defining the Entity C++ class
    4. Evaluating data structure and algorithm
      1. Measuring the efficiency of data structures
        1. Measuring of complexity
        2. Measuring scalability
      2. Big O: Measuring the efficiency of data structures and algorithms
    5. Basic data structure for collections
      1. Array
        1. Common operations on arrays
        2. Inserting/deleting versus enabling/disabling
      2. Standard C++ implementation of dynamic array
        1. Common operations on std::array
      3. List
        1. Accessing a specific element
        2. Enumerating elements in the list
        3. Inserting and deleting an element
        4. Sort
    6. The order matters – LIFO and FIFO
      1. Stack
        1. Common operations on the stack
      2. Queue
        1. The sample project
    7. Summary
  5. Algorithms Commonly Utilized in Game Development
    1. Technical requirements
    2. Exploring randomization
      1. Understanding the algorithm
      2. Implementing the code in C++
    3. Selection algorithms
      1. Random selection
      2. Weighted random selection
        1. Demo3a: Random and weighted-random selections in action
      3. Exclusive selection
        1. Demo3b: Exclusive random selection
    4. Shuffling for randomization
      1. Demo3c: Fisher-Yates shuffling
    5. Sorting algorithms
      1. Demo3d: Sorting cards
    6. Procedural generation
      1. Demo3e: Maze generation
    7. Object pooling
      1. Outlining the pooling algorithm
      2. Applying ObjectPool
    8. Summary
  6. Part 2: Graphics Algorithms in Practice
  7. 2D Rendering and Effects
    1. Technical requirements
    2. Understanding 2D graphics operations behind the scenes
      1. Loading and rendering a texture as an image
      2. Choosing an appropriate texture format
      3. Using the cache to avoid loading the same texture repeatedly
        1. Implementing an LRU texture cache
    3. Working with 2D texture rendering
      1. Rendering part of a region from the source texture
      2. Rotating the texture image
      3. Color blending
      4. Alpha blending
        1. Advanced color and/or alpha blending modes
        2. Combining both color and alpha blending
      5. N-patch texture
    4. Using screen scrolling
      1. Parallax scrolling
        1. How parallax scrolling works
    5. Rendering isometric maps
      1. How isometric projection works
    6. Summary
  8. The Camera and Camera Controls
    1. Technical requirements
    2. Camera – how players see the game world
      1. Common uses of cameras in video games
        1. First-person camera
        2. Third-person camera
        3. Top-down camera
        4. Rail camera
        5. Fly-through camera
        6. Other variations
    3. Defining the camera for rendering a scene
      1. Basic properties of a camera system
      2. Projecting a 3D world onto a 2D screen
        1. Perspective projection
        2. Orthographic projection
    4. Working with the built-in camera system
      1. Using the first-person-view camera
      2. Using the orthogonal camera
      3. Overriding the default control for built-in cameras
    5. Building a third-person follow-up camera
    6. Building a rail camera system
    7. Building a top-down camera for RTS
    8. Rendering multiple split-screen cameras
      1. Customizing the rendering operation
      2. Working with RenderTexture
    9. Summary
  9. 3D Graphics Rendering
    1. Technical requirements
    2. Programming with modern GPUs
      1. Understanding different coordinated spaces
        1. Model space
        2. World space
        3. View space (camera space/eye space)
        4. Clip space
        5. Normalized device coordinates space (NDC)
        6. Screen space
      2. Introducing the 3D graphics rendering pipeline ...



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.