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

Action latency


Now that we've created both approaches for animation handling, we'll take a look at the pros and cons of each implementation. Direct control gives our agents absolute control over animations and allows the decision logic to account for the cost of animation playback. While it might seem counter-intuitive to mix animation logic with decision logic, this allows a direct control agent to be in absolute control over the minimum amount of latency required to go from a decision to a visible action within the sandbox.

With the indirect animation controller taking control over the body, the agent now faces a new issue, which is action latency. Action latency is the time between when a command is queued till it is acted upon. With our current setup of a fully connected ASM, this latency is minimized as any command can go directly to any queued command. A fully connected ASM is not a typical representation of an ASM, though. For many game types, this responsiveness won't affect the gameplay...