Book Image

Unreal Engine 4 AI Programming Essentials

By : Jie Feng, Peter Newton
Book Image

Unreal Engine 4 AI Programming Essentials

By: Jie Feng, Peter Newton

Overview of this book

Unreal Engine is a powerful game development engine that provides rich functionalities to create 2D and 3D games. Developers have the opportunity to build cross-platform mobile and desktop games from scratch. This book will show you how to apply artificial intelligence (AI) techniques to your Unreal project using blueprints as your scripting language. You will start with an introduction to AI, and learn how it is applied to gaming. Then you'll jump right in and create a simple AI bot and apply basic behaviors to allow it to move randomly. As you progress, you'll find out how to implement randomness and probability traits. Using NavMesh, you will impart navigation components such as character movement, MoveTo nodes, settings, and world objects, and implement Behavior Trees. At the end of the book, you will troubleshoot any issues that might crop up while building the game.
Table of Contents (16 chapters)
Unreal Engine 4 AI Programming Essentials
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Unreal Engine 4 tools


Unreal Engine 4 provides a complete suite of tools to add common AI capability to your game. We will go into the details of each tool within this book. Here is a list of the tools that are covered:

  • Behavior Tree: This is used to create different states and the logic behind AI.

  • Navigation Component: This handles movement for AI.

  • Blackboard Asset: These are used to store information. They act as the local variable for AI.

  • Enumeration: This is used to create states, which you can alternate between.

  • Target Point: Our Waypoints class is derived from the Target Point class, which we will use to create a basic form of Path node.

  • AI Controller and Character: This controller will handle communication between the world and controlled pawn for AI.

  • Navigation Volumes: This is used to create Navigation Mesh in the environment to enable Path Finding for AI.

Let's look at the following screenshot:

There are two types of NavMesh volume. The first, the NavMesh Bounds volume, defines the area for NavMesh. The Nav Modifier volume, when supplied with a Nav Area class, affects the NavMesh Bounds volume's navigation attributes where the two intersect.