Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity AI Programming Essentials

You're reading from   Unity AI Programming Essentials Use Unity3D, a popular game development ecosystem, to add realistic AI to your games quickly and effortlessly

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783553556
Length 162 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Curtis Bennett Curtis Bennett
Author Profile Icon Curtis Bennett
Curtis Bennett
Arrow right icon
View More author details
Toc

An overview of attack AI


Attack AI is a large and much studied subject. When you start dealing with things such as different attack moves based on different player actions or having enemies coordinate attacks, the AI can become quite complex. However, designing good AI that attacks is the same as designing for other AI scenarios we have looked at so far in this book. First, we need sensors for our AI characters to perceive game events and to create aspects in the game world, tagging what they can sense. Then, we define behavior trees for the characters, directing them to change actions based on sensor response or other game states, such as running out of ammo. Defining different behaviors is the main part of setting up attack AI.

We'll look at two foundational AI attack behaviors in our demos in this chapter. The first will use multiple sensors on the AI to determine when to chase and when to stop and attack. The second behavior we will look at is the duck and cover type, where the enemy...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime