Issue #4 resolved

AI behavior

Jake Albano
repo owner created an issue

AI should go into patrol mode when the player isn't in view, and go into attack mode when he is. When sufficiently damaged, AI should go into flee mode.

In patrol mode, the AI simply walks back and forth along a platform until he reaches the end or hits an obstacle. (Already implemented.)

Attack mode should involve ranged attacks while approaching player, and melee attacks when close enough.

In flee mode, the AI should run backwards shooting the player while trying to get away.

Advanced pathfinding

If an AI is in flee mode and another platform is adjacent, the AI should attempt to jump to it.

Having the AI go for help would be nice but possibly difficult.

Comments (4)

  1. Jake Albano reporter

    I think I've figured out a way to make the AI patrol multiple platforms if they're close enough to one another; possibly even jumping from one to another. I'm striking the goal of having them run backwards and attack while fleeing, since I like the behavior as it is.

    As it stands, these are the goals:

    • Make detections based on line-of-sight instead of platform collision
    • Traverse platforms recursively and find neighboring platforms to walk/jump onto
    • Switch to melee attack if distance to player is close enough
    • Tweak come-to-rest procedure for removal of collision hulls
    • Increase health gradually instead of suddenly when in flee mode
  2. Log in to comment