Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Game Development Patterns with Unreal Engine 5
  • Table Of Contents Toc
Game Development Patterns with Unreal Engine 5

Game Development Patterns with Unreal Engine 5

By : Stuart Butler, Tom Oliver
4.2 (21)
close
close
Game Development Patterns with Unreal Engine 5

Game Development Patterns with Unreal Engine 5

4.2 (21)
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, you’ll be proficient in designing systems with the perfect C++/Blueprint blend for maintainable and scalable systems.
Table of Contents (16 chapters)
close
close
1
Part 1:Learning from Unreal Engine 5
6
Part 2: Anonymous Modular Design
10
Part 3: Building on Top of Unreal

Implementing the Command pattern for different use cases

The Command pattern adds a layer of separation between the request for an action and that action being carried out. The implementation looks like what is shown in Figure 8.2, where the Command class parent is abstract and only has a constructor, execute(), and undo() functions that all take no arguments. The idea is that the child classes are more specific and contain all the object references needed to execute properly:

Figure 8.2 – UML diagram showing the structure of a Command pattern base class

Figure 8.2 – UML diagram showing the structure of a Command pattern base class

The purpose of a command is to reify the abstract idea of an action so that we can store it in a list. This list can have many uses, but the most identified is the undo queue that Microsoft made synonymous with its keyboard shortcut, Ctrl + Z. When an action is performed, a Command object of the relevant type is created and added to the list. The command is executed and left in this list until it...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Game Development Patterns with Unreal Engine 5
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon