Book Image

Practical Game AI Programming

By : Micael DaGraça
Book Image

Practical Game AI Programming

By: Micael DaGraça

Overview of this book

The book starts with the basics examples of AI for different game genres and directly jumps into defining the probabilities and possibilities of the AI character to determine character movement. Next, you’ll learn how AI characters should behave within the environment created. Moving on, you’ll explore how to work with animations. You’ll also plan and create pruning strategies, and create Theta algorithms to find short and realistic looking game paths. Next, you’ll learn how the AI should behave when there is a lot of characters in the same scene. You'll explore which methods and algorithms, such as possibility maps, Forward Chaining Plan, Rete Algorithm, Pruning Strategies, Wall Distances, and Map Preprocess Implementation should be used on different occasions. You’ll discover how to overcome some limitations, and how to deliver a better experience to the player. By the end of the book, you think differently about AI.
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
6
Navigation Behavior and Pathfinding
9
AI Planning and Collision Avoidance

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...