- Practical Game AI Programming
- Micael DaGra?a
- 358字
- 2021-07-02 20:43:03
How to use possibility maps
Let's take a look at a simple example of a common FPS game, and for that we'll be using the states demonstrated in the preceding image.
Imagine that we are the enemy character of the game and our goal is to shoot and kill the player using only the states walk, run, cover, jump, fire, and defend. We need to take into consideration that the player will do his best to kill us, and therefore a lot of possible scenarios may arrive. Let's start with the basics–we are walking from one point to another while protecting our space and as the player goes near that space, our goal changes from protecting our space to the definitive goal, that is, killing the player. What should we do next? Fire? Run towards the player and fire from close range? Cover and wait until the player is nearby? What if the player saw us first and is preparing to fire at us? A lot of things could happen, and a lot of things can be done with just a few states. So, let's map every possible situation and plan how we should act or react in each individual situation. Examples that I would choose for my game are as follows:
- Walk slowly to a cover position, wait for the player, and shoot him
- Run for cover and then fire from that position
- Defend (moving away from the bullets) while running to a cover position
- Fire against the player, running towards him, and keep firing
Depending on the type of game that we want to create, we can use the same states to shape it into a different genre. We also need to take into consideration the personality of the character that we are programming. If it's a robot, it probably won't be afraid to keep firing against the player, even if the chances of getting destroyed are 99%. On the other hand, if it's an inexperienced soldier, it might feel reluctant to get shot and will run for cover instantly. The list goes on and on just by changing the personality of the character.

- CMDB分步構(gòu)建指南
- Functional Programming in JavaScript
- 零基礎(chǔ)學(xué)MQL:基于EA的自動(dòng)化交易編程
- Apache Mahout Clustering Designs
- Spring MVC+MyBatis開發(fā)從入門到項(xiàng)目實(shí)踐(超值版)
- Building Serverless Web Applications
- Python面試通關(guān)寶典
- Getting Started with Web Components
- R統(tǒng)計(jì)應(yīng)用開發(fā)實(shí)戰(zhàn)
- Programming MapReduce with Scalding
- 片上系統(tǒng)設(shè)計(jì)思想與源代碼分析
- Offline First Web Development
- 高性能Scala
- Java程序設(shè)計(jì)教程(慕課版)
- 基于Eclipse平臺的JSP應(yīng)用教程(第2版)