jeudi 13 août 2020

BTA Game : Enemy AI

 On this small subject, I focus on enemy AI. On a bta game, one of difficult task is to keep ai balancing.Enemy should not be too weak but also no to skillful.

Design 

I'am playing the latest  Devil May Cry on PS4, and I try to reproduce the enemy behavior. Enemy on this game are weak, they are mainly use for player to perfom combo. But they sometime have some reactions 

Architecture

I use a Finite State machine to present different states of the AI :

- Approach : Enemy approach player from a random distance
- Idle : It's will stay idle for some time. If the player come to close to him, it will sometimes attack. Always attacking will make him to strong.

Eneny will have 2 attacks : 

- Attack : It's will try perform an attack, to do that, its will come near to player and attack him
- Rush Attack : It's a special attack. Enemy will rush to the player know position to attack him. If the player move , enemy will attack on his last know position.

Because this enemy is a common enemy, it's shoud be more weak than strong

Standard Attack


Rush Attack
Rush Attack