Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Game AI Programming

You're reading from   Practical Game AI Programming Unleash the power of Artificial Intelligence to your game

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher Packt
ISBN-13 9781787122819
Length 348 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Micael DaGraça Micael DaGraça
Author Profile Icon Micael DaGraça
Micael DaGraça
Arrow right icon
View More author details
Toc

Automated finite-state machines (AFSMs)

As we observed in the Super Mario Bros example, enemies know how to react no matter what position they are placed in. Obviously, it is not required for them to perform complex tasks or plan ahead what they will do, but it served perfectly as an example, especially when compared with other video games with different genres. For example, we can see the same principles being used on Halo with the Grunts (the small enemies). They simply move from one side to another and if they find the player they start shooting at him. It's the same principle, where they simply added a personality to their character that would run away every time they lost the combat against the player. For that, they used a statement where, every time the character is below a certain number of HP, they start running away. FSMs are what we used to create our possibility...

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 $19.99/month. Cancel anytime
Banner background image