Book Image

Game Development Patterns with Unreal Engine 5

By : Stuart Butler, Tom Oliver
4 (3)
Book Image

Game Development Patterns with Unreal Engine 5

4 (3)
By: Stuart Butler, Tom Oliver

Overview of this book

Design patterns serve as a toolkit of techniques and practices that enable you to write code that’s not only faster, but also more manageable. With this book, you’ll explore a range of design patterns and learn how to apply them to projects developed in Unreal Engine 5. You’ll begin by delving into the foundational principles of coding and develop a solid understanding of the concepts, challenges, and benefits of using patterns in your code. As you progress, you’ll identify patterns that are woven into the core of Unreal Engine 5 such as Double Buffer, Flyweight, and Spatial Partitioning, followed by some of the existing tool sets that embody patterns in their design and usage including Component, Behavior Tree, and Update. In the next section of the book, you’ll start developing a series of gameplay use cases in C++ to implement a variety of design patterns such as Interface and Event-based Observers to build a decoupled communications hierarchy. You’ll also work with Singleton, Command, and State, along with Behavioral Patterns, Template, Subclass Sandbox, and Type Object. The final section focuses on using design patterns for optimization, covering Dirty Flag, Data Locality, and Object Pooling. By the end of this book, you’ll be proficient in designing systems with the perfect C++/Blueprint blend for maintainable and scalable systems.
Table of Contents (16 chapters)
1
Part 1:Learning from Unreal Engine 5
6
Part 2: Anonymous Modular Design
10
Part 3: Building on Top of Unreal

What this book covers

Chapter 1, Understanding Unreal Engine 5 and Its Layers, explores Unreal Engine 5 and offers a brief history. We will look at the “fuzzy” layer that bridges the gap between C++ and Blueprint and learn how to translate Blueprint back to C++.

Chapter 2, “Hello Patterns”, focuses on the principles that underpin all good code. We will explore design patterns as well as some common Blueprint mistakes, looking at how we can fix them.

Chapter 3, UE5 Patterns in Action – Double Buffer, Flyweight, and Spatial Partitioning, discovers how Unreal Engine 5 employs these three design patterns as we explore a range of tools within the engine.

Chapter 4, Premade Patterns in UE5 – Component, Behavior Tree, and Update Method, utilizes the pre-built implementations of these three design patterns and explores the tools within the engine to expand simple systems.

Chapter 5, Forgetting Tick, develops your understanding of Tick, looks at why its usage can cause issues, and explores two approaches to building systems without it.

Chapter 6, Clean Communication – Interface and Event Observer Patterns, explores design patterns that allow us to improve how different actors communicate with each other, producing more efficient solutions to communication.

Chapter 7, A Perfectly Decoupled System, discovers how we can use UML as a methodology for planning class hierarchies, to decouple the reference train.

Chapter 8, Building Design Patterns – Singleton, Command, and State, examines these three design patterns to understand their usage, limitations, and suitability across a range of game genres.

Chapter 9, Structuring Code with Behavioral Patterns – Template, Subclass Sandbox, and Type Object, explores the three most common structural patterns while building weapons classes in C++, which we will expand with Blueprint, exploring how the two languages can be used together.

Chapter 10, Optimization through Patterns, dives into the key elements of optimization before releasing games by exploring the Dirty Flag, Data Locality, and Object Pooling design patterns.