Book Image

Learning Game AI Programming with Lua

By : David Young
Book Image

Learning Game AI Programming with Lua

By: David Young

Overview of this book

Table of Contents (16 chapters)
Learning Game AI Programming with Lua
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with AI Sandbox
Index

Constructing an influence map


Constructing an influence map requires configuration parameters as well as a navigation mesh on which we can base the influence map. Instead of analyzing all geometry in the sandbox, an optimization is done by constructing grid cells along the navigation mesh itself. As all walkable areas are represented by the navigation mesh, the influence map will be able to store spatial data for all regions that agents can path to.

A navigation mesh used to construct the influence map

While information about all possible areas might be useful for certain tactical analysis, in practice, the additional memory and performance constraints are a higher priority.

Note

As the influence map is based on the underlying navigation mesh, try changing the configuration of the navigation map to generate different influence map representations.

Configuration

Configuring the influence map boils down to specifying a cell width, cell height, and any boundary offsets. Even though the maximum size...