Learning Game AI Programming with Lua (Paperback)
暫譯: 使用 Lua 學習遊戲 AI 程式設計 (平裝本)

David Young

相關主題

商品描述

Leverage the power of Lua programming to create game AI that focuses on motion, animation, and tactics

About This Book

  • 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

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.

Knowledge of C++ will 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.

What You Will Learn

  • 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 behavior 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 broken up 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.

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. By the end of the book, your AI will be able to navigate, pathfind, manage animation playback, communicate, and perceive their environment.

商品描述(中文翻譯)

**利用 Lua 程式設計的力量來創建專注於運動、動畫和戰術的遊戲 AI**

## 本書介紹

- 專注於程式設計遊戲 AI,而非處理低層次的資源管理
- 將 Lua 綁定以使用 C++ 後端構建基於腳本的遊戲 AI,該後端提供圖形、物理和資源處理的掛鉤
- 基於教程的方法,逐步分層構建 AI 功能,以創建完全功能的 AI

## 本書適合誰

如果您是遊戲開發者或希望專注於程式設計系統和技術以構建遊戲 AI 的一般程式設計師,而不想在遊戲引擎中創建低層次的介面,那麼這本書適合您。

對 C++ 的知識將有助於調試整個 AI 沙盒並擴展書中現有的功能,但並不是必需的。

## 您將學到什麼

- 創建動畫狀態機以驅動 Lua 中的 AI 動畫
- 在導航網格上構建和尋找路徑
- 在完整的 Lua IDE 中編寫和調試 Lua 腳本
- 使用行為樹、狀態機和決策樹開發決策邏輯,以構建模組化、可重用的 AI
- 使用黑板數據結構管理短期和長期知識表示
- 添加感知能力,使 AI 能夠看見和聽見
- 基於影響圖開發多個 AI 的高級戰術

## 詳細內容

遊戲 AI 可以輕鬆拆分為多個組件,例如決策、動畫處理和戰術,但每個系統之間的平衡和互動在良好 AI 和不良 AI 之間取得了平衡。

從 AI 沙盒的介紹開始,每個新的遊戲 AI 方面都會被介紹、實現,然後進一步擴展。接下來,您將學會利用開源庫,如 Ogre3D、Bullet Physics、OpenSteer、Recast、Detour 和 Lua,來創建一個 AI 沙盒,並擁有整個代碼庫以供擴展和逐步學習。

這是通過逐步的方法完成的,從學習移動基本形狀到完全動畫化您的士兵。在書的結尾,您的 AI 將能夠導航、尋路、管理動畫播放、進行通信並感知其環境。