- Practical Game AI Programming
- Micael DaGra?a
- 257字
- 2021-07-02 20:43:03
Preparing a possibility map (FPS)
At this point, we are able to understand what a possibility map is and how it can be used to create an AI character that behaves accordingly to different situations in the game. Now that we understand how to use a possibility map, let's create a practical example where we programmed our AI character to successfully defeat the player. For this example, I'll be using two models, one represents the AI enemy that we are programming and the other one represents the player.
We'll create a common example, where the AI is protecting the entrance of a building that the player needs to enter in order to deactivate a bomb and complete the level. Let's imagine that we already have the player fully programmed and that we now need to focus on our AI enemy, as shown in the following screenshot:

Before writing any line of code we need to think about the possible situations that can occur and how our AI will react to them. First, we'll be simplifying the situation by breaking down our stages into a simple 2D visualization that will be used as a reference to determinate distances and other relevant parameters.

After simplifying the situation, we are ready to start planning the possibilities. The player is allowed to move around the building. Note that there's only one entrance, and that entrance is protected by our enemy AI. The arrows represents the direction that the characters are facing, and this will be an important aspect to our planning.
- JavaScript:Functional Programming for JavaScript Developers
- 無代碼編程:用云表搭建企業(yè)數(shù)字化管理平臺
- R語言數(shù)據(jù)可視化之美:專業(yè)圖表繪制指南
- JavaScript 程序設計案例教程
- Scala編程實戰(zhàn)(原書第2版)
- 碼上行動:用ChatGPT學會Python編程
- 零基礎Java學習筆記
- OpenGL Data Visualization Cookbook
- 從Excel到Python數(shù)據(jù)分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- Go語言從入門到精通
- 透視C#核心技術:系統(tǒng)架構及移動端開發(fā)
- C/C++程序設計教程
- 深入理解Android:WebKit卷
- Python程序設計案例教程:從入門到機器學習(微課版)
- JavaScript實戰(zhàn)-JavaScript、jQuery、HTML5、Node.js實例大全(第2版)