Hands-On Artificial Intelligence with Unreal Engine
上QQ阅读APP看书,第一时间看更新

Creating our AI project

From now on, we will get our feet wet by creating a project, and get a gist of what we have learned about Behavior Trees. In this section, we are going to create a simple tree, but as we learn more about other topics in the following chapters, we will iterate over the tools for Behavior Trees. As a result, this will provide you with a better understanding of the tools that are required to create awesome Behavior Trees. Then, in Chapter 8, Designing Behavior Trees - Part I, Chapter 9,  Designing Behavior Trees - Part II, and Chapter 10, Designing Behavior Trees - Part III, we will be focusing on how to create and design a Behavior Tree from scratch that chases the player, which will give you a practical approach to Behavior Trees.

So, to be able test the techniques that we are going to explore in this book, we need to create a project. By doing this, you will be able to follow the practical aspects that will be covered throughout this book.

You can create a new project from a template. The Third Person template works particularly well. In fact, it already has a character set up inside it, which can be easily possessed by an AI. This means that you don't have to worry too much about non-AI related details, such as animations. You can choose either the Blueprint version or the C++ one. I'll explain the concepts that we'll cover in both Blueprint and C++ terms throughout, but do note that some techniques in this book will work better if they're programmed in C++. As a result, I'm choosing the C++ version of the Third Person template, although this initial choice doesn't affect us much (we are programming AIs, not a Player or Gameplay).

Finally, I'm naming my project UnrealAIBook, as shown in the following screenshot. Once again, you will be able to find the project files at the following link: http://hog.red/AIBook2019ProjectFiles (the link is case-sensitive):