Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Game AI Programming

You're reading from  Practical Game AI Programming

Product type Book
Published in Jun 2017
Publisher Packt
ISBN-13 9781787122819
Pages 348 pages
Edition 1st Edition
Languages
Author (1):
Micael DaGraça Micael DaGraça
Profile icon Micael DaGraça

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 and probability maps; this is also what the character should do in different situations he is facing at the moment...

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 $15.99/month. Cancel anytime}