logo资料库

Unreal Engine 4 AI Programming Essential.pdf

第1页 / 共188页
第2页 / 共188页
第3页 / 共188页
第4页 / 共188页
第5页 / 共188页
第6页 / 共188页
第7页 / 共188页
第8页 / 共188页
资料共188页,剩余部分请下载后查看
Cover
Copyright
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Table of Contents
Preface
Chapter 1: Introduction to Game AI
Game Artificial Intelligence
How AI affects the gaming experience
Techniques and practices of game AI
Navigation
Achieving realistic movement with Steering
Creating a character with randomness and probability
Creating complex decision making with Behavior Tree
Root
Decorators
Composites
Services
Tasks
Blackboard
Sensory systems
Machine learning
Tracing
Influence Mapping
Unreal Engine 4 tools
Summary
Chapter 2: Creating Basic AI
Goal
Setting up the project
Environment
Prerequisites
Using our new AIController class
Assigning the AIController class
Placing the pawn
Sending the instructions
Small tips on MoveToLocation
Reviewing the current progress
Adding the challenge
Traces
Reviewing the current progress
The Enemy logic
Adding the Enemy AI
Summary
Chapter 3: Adding Randomness and Probability
Introducing probability
Probabilistic distribution
Non-uniform distribution
RandomStream in Unreal Engine 4
The plan
Adding Wander
Setting up the project
Creating probability
Non-uniform distribution with Random Stream
Creating transitions
Fleeing and attacking
Back to the action
The results!
Summary
Chapter 4: Introducing Movement
Overview
Path Finding
The A* algorithm
Navigation Mesh
RecastNavMesh
The movement component
The AIController
Let's start!
Waypoints
Navigation
Navigation Modifiers
Back in the editor
The NavArea class
The navigation cost
Summary
Chapter 5: Giving AI Choices
Behavior Tree in the AIController
Creating Behavior Tree
Blackboard
Designing Behavior Tree
The Behavior Tree service
State transitions
Blackboard Compare Decorator
Environment Query System
Summary
Chapter 6: How does Our AI Sense?
Overview
AI sensing
AI Perception components
State machines
Pawn detection
State transition
Resetting the state
Simulating and playing
Summary
Chapter 7: More Advanced Movement
Setting up the agents
Viewing the agent
Following the agent
Follow or lead
Steering behavior: Flocking
Flocking agents
Controlling behavior through UMG
A simple UI
Summary
Chapter 8: Creating Patrol, Chase, and Attack AI
Creating a Blackboard
Mid-range attack
Controllers
Waypoints
BT Composites, Task, Decorator, and Service
Creating the logic
Summary
Chapter 9: What Have We Learned?
Creating basic AI
The pros and cons of using controls
Adding randomness and probability
The pros and cons of using randomness
The pros and cons of using probability
Introducing movement
Giving our AI choice
The pros and cons of using EQS
The pros and cons of using Blueprint
How does our AI sense?
More advanced movement
Creating patrol, chase, and attack AI
The pros and cons of using Behavior Tree
The pros and cons of using blueprint for AI
Summary
Index
Unreal Engine 4 AI Programming Essentials Create responsive and intelligent game AI using Blueprints in Unreal Engine 4 Peter L. Newton Jie Feng BIRMINGHAM - MUMBAI
Unreal Engine 4 AI Programming Essentials Copyright © 2016 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: March 2016 Production reference: 1110316 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78439-312-0 www.packtpub.com
Credits Authors Peter L. Newton Jie Feng Reviewer Hamad A. Al-Hasan Commissioning Editor Edward Bowkett Acquisition Editor Larissa Pinto Content Development Editor Merint Thomas Mathew Technical Editor Dhiraj Chandanshive Copy Editor Shruti Iyer Project Coordinator Judie Jose Proofreader Safis Editing Indexer Tejal Daruwale Soni Production Coordinator Aparna Bhagat Cover Work Aparna Bhagat
About the Authors Peter L. Newton gravitated toward computers at a young age. As his appetite for technology grew, web applications were his first exploration into development. The excitement of programming is what kept Peter diving further into different software designs and programming patterns. He is a self-taught programmer who has spent countless hours in reverse engineering assembly and arm instruction executables just for the joy of learning. Peter has several years of experience as a web developer, software developer, database architect, and hardware technician. His recent years were dedicated to the Virtual Reality/Gaming industry experience, working with such companies as Create, Sony Pictures, and the developers of Unreal Engine 4, Epic Games. Peter's most recent VR project was Can You Walk The Walk?, which won Digital Hollywood's "Best In Virtual Reality Based on a Cinematic or Television Experience" award. Thank you, readers, for your continued support in my AI adventures! I've created many tutorials, and because of your overwhelming response, I was reached out to by Epic Games, who requested my services as AI programmer. I've also made quite a few friends, such as Micheal Allar, Chance Ivey, Nick Whiting, Alexander Paschall, Yoeri, Jan, Pete, and many I'm likely to forget, and this is just to name a few. It has been an amazing few years! Living Epic!
Jie Feng is originally from Jiaxing, China. He is currently a PhD candidate at Columbia University, specializing in machine learning and computer vision. He has conducted research on problems ranging from detecting and recognizing objects in images and retrieving similar images from large-scale databases to understanding human behavior in videos. Jie's work has been published at top international conferences, and he has been granted a U.S. patent. He is also a software designer and developer and has worked at Microsoft, Amazon, and Adobe. Jie is passionate about applying Artificial Intelligence to real-world problems. His project using Microsoft Kinect to analyze motion for fitness has won People's Choice Award at Innovative Health Tech NYC competition, 2013. Jie is currently working on a fashion discovery product named EyeStyle. Video games are the very thing that motivated him to study computer science. His favorite genre is action adventure. Titles including Resident Evil, Tomb Raider, and Uncharted inspire him in innovative thinking. This book is a unique experience for Jie to put his knowledge on Artificial Intelligence to game design and examine the potential of creating intelligent characters using Unreal Engine 4. I would like to thank my parents for their unconditional love and support for my work and every decision I have made in my life. I feel lucky to have many talented people as my friends and colleagues, both in China and the U.S.. Last but not least, I want to express my appreciation to all game designers and developers out there for creating the fantasy world that inspires people and enriches their lives.
About the Reviewer Hamad A. Al Hasan has a passion for games and game development and it has taken him far from the shores of Bahrain, where he graduated from Bahrain University in computer science. After working for a couple of years as software engineer, he jumped across the sea and the ocean to work as a gameplay programmer for Action Mobile Games in USA on their Infected Wars title. Hamad developed a passion for Unreal Engine, which then took him to Serbia at Digital Arrow and to Saudi Arabia as a consultant for Semanoor, the publisher of Trails of Ibn Battuta. After this, he worked as technical director for Empire Studios, a local game studio, in which he played a key role in establishing the studio as well as overseeing all the technical aspects of an unannounced mobile game. Since 2010, Hamad has worked on a variety of systems, be it about player movements, camera and controls, Artificial Intelligence, networking and replication, weapons, different customizations, HUD, or Menus. He is equally familiar with Unreal Editor and its tools and has also developed a strong expertise in material and shader creation. Back in Bahrain, Hamad works on his own projects while continuing his freelance work. You can contact him at http://www.alhasanstudio.com/.
www.PacktPub.com eBooks, discount offers, and more Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why subscribe? • Fully searchable across every book published by Packt • Copy and paste, print, and bookmark content • On demand and accessible via a web browser
分享到:
收藏