
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.
