AI

I have had a long thought about AI.

Here are my suggestions how it can be improved:

1. Fear. I would like to have monsters that run away. This could be under the following circumstances:

  • Being damaged a lot. (Lets say 50%)
  • Being a higher level than the monsters.
  • Monsters usually run away to friends (who are not yet triggered)

2. Communication between monsters.

  • When a monster notices you, all creatures near him will notice and attack you as well. (At least those on the same team, see below)
  • A monster will also “scream for help” when they are fleeing. (See fear) This can cause a lot of monsters to get triggered. Not sure yet, if they should attack or contignue fleeing.

3. Non-target specific AI code. At the current moment, monsters can only attack players. I would like to see that different.

  • All creatures are put inside a team. (1 byte, at first: 0 = player, 1 = monsters)
  • This allows for making friendly creatures, summons and henchmen.
  • It is (almost) a must for multiplayer.

 

4. Better path-finding. In the current situation monsters try to run towards you. If they got blocked, they stop moving. I do not have one solution for this problem, but 3 ones (and all in some way or another flawed).

 

  • A* is a bit of an overkill, and often uses too many resources for a simple game. [difficult code, resourse high, perfect patfinding]
  • The labyrinth / follow the right (or left) wall mechanism. [moderate code, resource low, improved pathfinding]
  • Moving a few steps in a random direction when getting stuck. (I think that we can do a bit better than random but you get the idea) [simple code, resource low, improved pathfinding]

PS: Clint, I do not post this to give you more work. I am confident enough in my coding skills that I can probably implent these AI improvements myself.