Learning Game AI Programming with Lua

Book and eBook expected November 2014. Pre-order now!
Learning Game AI Programming with Lua
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
save 20%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Table of Contents
Sample Chapters
  • Focus on programming game AI rather than handling low-level resource management
  • Bind Lua to build a script-based game AI using a C++ backend that provides hooks for graphics, physics, and resource handling
  • A tutorial-based approach where AI functionalities are layered piece by piece to create fully functional AI

Book Details

Language : English
Paperback : 400 pages [ 235mm x 191mm ]
Release Date : November 2014
ISBN : 1783281332
ISBN 13 : 9781783281336
Author(s) : David Young
Topics and Technologies : All Books, Game Development, Open Source
Sorry, the table of contents for this book is not yet available.

David Young

David Young is a professional software engineer in the games industry. He started his career at the NASA Deep Space Network and later moved to the NASA Jet Propulsion Laboratory for the Curiosity Rover mission. After leaving NASA, he worked on the platform that powered Riot Game’s League of Legends. David is simultaneously pursuing a PhD at the University of Southern California, focusing on graphics research in the field of real-time hair rendering and simulation.
Sorry, we don't have any reviews for this title yet.

Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sorry, there are currently no downloads available for this title.

Frequently bought together

Learning Game AI Programming with Lua +    Oracle Coherence 3.5 =
50% Off
the second eBook
Price for both: $44.10

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Create an animation state machine to drive AI animations within Lua
  • Build and find paths on navigation meshes
  • Write and debug Lua scripts within a full-scale Lua IDE
  • Develop decision logic with behaviour trees, state machines, and decision trees to build modular reusable AI
  • Manage short and long term knowledge representation with blackboard data structures
  • Add sensory perception to give AIs the ability to see and hear
  • Develop high-level tactics with multiple AIs based on influence maps

In Detail

Game AI can be easily be broken into a number of components such as decision making, animation handling, and tactics, but the balance and interaction between each system strikes a balance between good AI and bad AI. The ability to iterate quickly in script on AI systems allows Lua to create robust, scalable solutions unique to the specific game.

Being one of the most important parts of a large number of low level game engines, programming game AI becomes difficult, especially when there is a need to program and interface a number of non-AI systems.

Beginning with an introduction to the AI sandbox, each new aspect of game AI is introduced, implemented, and then expanded upon. Going forward, you will learn to utilize open source libraries such as Ogre3D, Bullet Physics, OpenSteer, Recast, Detour, and Lua to create an AI Sandbox with an entire codebase available to expand and step through.

This is done through a step-by-step approach, from learning to move basic shapes to fully animating your soldiers. After gaining insights into Low-level Agent systems in Sandbox, you will learn High-level Decision-Making to enable agents to act on them. Once the agents are able to act on decisions, you will enable knowledge representation in them.

By the end of the book, you will learn to execute your AI simultaneously, use the concept of Co-routines to perform cooperative multithreading operations, and enable concurrent programming with asynchronous Service-based Parallelism.


A step-by-step tutorial approach, where new systems and techniques are introduced and implemented by the reader. Each script system builds upon the previous systems adding new functionality to the AI. The AI Sandbox focuses on experimentation and iteration speed to quickly build up AI features.

Who this book is for

If you are a game developer or a general programmer who wishes to focus on programming systems and techniques to build your game AI without creating low-level interfaces in a game engine, then this book is for you. Having knowledge of C++ would come in handy to debug the entirety of the AI sandbox and expand on the features present within the book, but it is not required

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software