Hands-On Artificial Intelligence with Unreal Engine
eBook - ePub

Hands-On Artificial Intelligence with Unreal Engine

Everything you want to know about Game AI using Blueprints or C++

Francesco Sapio

Share book
  1. 552 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Artificial Intelligence with Unreal Engine

Everything you want to know about Game AI using Blueprints or C++

Francesco Sapio

Book details
Book preview
Table of contents
Citations

About This Book

Learn to build intelligent and responsive Non-Player Characters for your games with Unreal Engine Game AI.

Key Features

  • Understand the built-in AI systems in Unreal Engine for building intelligent games
  • Leverage the power of Unreal Engine 4 programming to create game AI that focuses on motion, animation, and tactics
  • Learn to profile, visualize, and debug your Game AI for checking logic and optimizing performance

Book Description

Learning how to apply artificial intelligence ( AI ) is crucial and can take the fun factor to the next level, whether you're developing a traditional, educational, or any other kind of game. If you want to use AI to extend the life of your games and make them challenging and more interesting, this book is for you.

The book starts by breaking down AI into simple concepts to get a fundamental understanding of it. Using a variety of examples, you will work through actual implementations designed to highlight key concepts and features related to game AI in UE4. You will learn to work through the built-in AI framework in order to build believable characters for every game genre (including RPG, Strategic, Platform, FPS, Simulation, Arcade, and Educational). You will learn to configure the Navigation, Environmental Querying, and Perception systems for your AI agents and couple these with Behavior Trees, all accompanied with practical examples. You will also explore how the engine handles dynamic crowds. In the concluding chapters, you will learn how to profile, visualize, and debug your AI systems to correct the AI logic and increase performance.

By the end of the book, your AI knowledge of the built-in AI system in Unreal will be deep and comprehensive, allowing you to build powerful AI agents within your projects.

What you will learn

  • Get an in-depth knowledge about all the AI Systems within Unreal Engine
  • Create complex AIs, understanding the art of designing and developing Behavior Tree
  • Learn how to perform Environmental Queries (EQS)
  • Master the Navigation, Perception, and Crowd Systems
  • Profile and Visualize the AI Systems with powerful debugging tools
  • Extend every AI and Debug system with custom nodes and functions

Who this book is for

Hands-On Artificial Intelligence with Unreal Engine is for you if you are a game developer with a bit experience in Unreal Engine, and now want to understand and implement believable game AI within Unreal Engine. The book will be both in Blueprint and C++, allowing people from every background to enjoy the book. Whether you're looking to build your first game or expand your knowledge to the edge as a Game AI Programmer, you will find plenty of exciting information and examples of game AI in terms of concepts and implementation, including how to extend some of these systems.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Hands-On Artificial Intelligence with Unreal Engine an online PDF/ePUB?
Yes, you can access Hands-On Artificial Intelligence with Unreal Engine by Francesco Sapio in PDF and/or ePUB format, as well as other popular books in Informatik & Webentwicklung. We have over one million books available in our catalogue for you to explore.

Information

Year
2019
ISBN
9781788831642
Edition
1

Section 1: The Unreal Framework

In this section, we are going to explore in depth the built-in Unreal AI Framework. We will start from what are Behavior Trees and Blackboard, and we will proceed in learning about the Navigation System, the Environmental Querying System and the Perception System. Towards the end of this section, we will also understand how Unreal handles large Crowds, and how we can extend (both in Blueprint and C++) our Behavior Trees, by creating custom Tasks, Decorators and Services.
The following chapters will be covered in this section:
  • Chapter 1, Moving the First Steps in the AI World
  • Chapter 2, Behavior Trees and Blackboards
  • Chapter 3, Navigation
  • Chapter 4, Environment Querying System
  • Chapter 5, Agent Awareness
  • Chapter 6, Extending Behavior Trees
  • Chapter 7, Crowds

Making the First Steps in the World of AI

From the bronze giant Talos, to Symbolic Systems and Neural Networks: how AI has been shaped and used in video games.
Welcome, reader, to the beginning of our journey in Artificial Intelligence, or AI for short. Have you ever wondered about how those hard-working peons in Warcraft explore complicated maps? Or, how those perky ghosts in Pac-Man can get you wherever you are? Or perhaps how your opponents in Final Fantasy optimize their attacks to slaughter your team?
A screenshot from Final Fantasy XV [Square Enix, 2016] during a battle.
Then you've come to the right place!
In this chapter, we will explore the prerequisites to becoming an AI game developer and how AI is used in the game development pipeline. Then, we will take a look at the history of AI in general and in video games, and learn how the conjunctive effort of many brilliant minds built AI as we know it today. Afterwards, we will discuss the AI Framework underneath the Unreal Engine, since this book will focus on Unreal.
Finally, we will plan our journey and get a general overview of the topics that the different chapters in this book deal with.

Before starting...

... I'd like to reply to some questions that some of you might already have.
Does this book take into account Blueprint or C++?
This book will explain both, so don't worry.
If you don't know C++, you can follow along with the Blueprint part of this book, and if you so wish, you can try the C++ one.
If, on the other hand, you are a programmer that prefers C++, then don't worry! This book will explain how to deal with AI in Unreal using C++.
There are so many books around about AI, why should I choose this one?
Different books explain different aspects of AI, and often they are not mutually exclusive, but rather they complement each other.
However, the major point of interest of this book is that it is a good compromise between the theory of the different AI systems that are present in Unreal and practical applications, since the whole book is full of concrete examples.
Does this book provide a test project/materials to work on?
Absolutely, yes. You will be able to download the content for this book from the following link: http://hog.red/AIBook2019ProjectFiles (the link is case-sensitive).
I am already using the Unreal Engine for Artificial Intelligence, is this book good for me?
This all depends on your level of knowledge. In fact, in the first part of this book, we will talk mainly about the AI framework that's built into the Unreal Engine and how to use it. This is probably the part you are more familiar with if you have had some experience with Unreal for AI. However, this book will dive deep in these topics, that even an expert could find some useful tips. The second part, instead, will discuss some debugging methods for Game AI and will also explain how to extend them (mainly with C++). Feel free to have a look at the outline, and decide if this book suits you.
I am already using another game engine, is this book still good for me?
Well, as much as I'd like to say that this is a general book about AI, it isn't—at least not completely. Although the main focus will still be toward the main concepts of AI, we will look at implementing them in Unreal. However, this book will heavily rely on the built-in AI framework in Unreal. Thus, I encourage you to read more generalized books about AI to get a better understanding. On the other hand, you can always try. Maybe, by understanding some concepts here, other books will be easier to read and you will be able to transfer this knowledge into the game engine of your choice.
I'm a student/teacher, is this book suitable for teaching in class?
Absolutely, yes. I know how important it is to find good resources when teaching a class, and I'm writing this book with this intention in mind. As a result, regardless of whether you are a student or a teacher, you will find a section at the end of each chapter with some exercises that you can improve your skills this (or propose them to your students, if you are a teacher). Also, you can find some more integrative material here: http://hog.red/AIBook2019LearningMaterial (the link is case-sensitive).
Is this book going to cover everything, everything, and everything about AI in Unreal and all its systems?
Well, despite my best efforts to describe each of the systems in great detail, covering everything is an impossible task, due also to the complexity of such big engine. However, I'm confident to say that this book covers most of the aspects related to each AI system within the Unreal Engine, including how to extend the built-in systems and how to efficiently perform debugging. Thus, I can certainly say that this book is very comprehensive.

Prerequisites

Since this book is targeted at people who are getting started with AI in game development, I will not assume any prior/background knowledge in AI. However, please take the following into account:
  • Blueprint users: You should be familiar with Blueprint programming, and know how a Blueprint graph works in general.
  • C++ users: You should be familiar with programming, especially with the C family languages (such as C, C#, C++, or even Java), and in particular with C++, since it's the language that Unreal Engine uses. Being familiar with the Unreal Engine C++ API is a great bonus, although not strictly required. So, even if you are not a master, don't worry—follow along and you will learn.
Also, it would be great if you had some knowledge about vector math and physical kinematic principles – at least the ones commonly used in video games. Either way, in case you are rusty on those, don't worry too much, since it is not required for this book; however, it is nice to have if you're looking for a job as an AI Developer.

Installing and preparing the software

Before you continue reading, let's install the software we need. In particular, we will need Unreal Engine and Visual Studio.

Unreal Engine

Let's talk about Unreal Engine. After all, this is a book about how to develop game AI within this wonderful game engine.
Unreal Engine is a game engine that was developed by Epic Games. It was first released in 1998, and nowadays it is one of the most used (open) game engines (alongside Unity) due to its powerful features. The following screenshot shows the main interface of Unreal Engine:
Screenshot of the main interface of Unreal Engine
We need to have the latest version of Unreal Engine installed. You can find it by visiting https://www.unrealengine.com/en-US/what-is-unreal-engine-4 . Unless you took Unreal Engine from the source c...

Table of contents