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

Chapter 2. Creating and Moving Agents

In this chapter, we will cover the following topics:

  • Setting up your first sandbox executable

  • Creating your first sandbox Lua scripts

  • Understanding agent properties and their effects

  • Basic Newtonian motion

  • Agent-steering forces

  • Creating seeking, pursuing, path following, and grouped agents

Now that we understand how AI sandbox is set up and some of the underlying system structure, we're going to dive head-first into creating a brand new sandbox demo. Throughout the rest of the book, the new Lua sandbox API will be introduced piece by piece, extending this demo with additional AI functionality, animation, graphics, and game play.

While the sandbox is doing a lot of heavy lifting in terms of graphics and physics, the core AI logic will be completely implemented in Lua, backed by data structures that are managed by the C++ code.