Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Vegeta

Improving AI

Recommended Posts

Is it technicaly posible, if you are a coder, improve DOOM monsters AI (not tu much, may be, something like the one of Hexen II monsters).

I'm not a coder, I'm just wondering, how hard that should be.

Share this post


Link to post
Vegeta said:

Is it technicaly posible, if you are a coder, improve DOOM monsters AI

...yes. Is there any reason why it wouldn't be "technically possible"?

Share this post


Link to post

Igor9 said:
Improved AI is murder for DOOM.


Heh well, I don't think Vegeta was talking about smart, thinking monsters but about giving them a wider range of behaviour traits. Eg. Hexen centaurs are as dumb as the next doom monster, but their pain response deflects incoming missiles. Or Bishops with their special movement, or a Heresiarch which has different modes of attack.

With MBF it's possible to switch a monster's behaviour with a new codepointer, which acts as a T-junction. The duration of that codepointer assigned frame is actually the chance it will jump to another frame while the default is jumping to the next frame. So you can make a trooper that would normally walk towards you but occasionally switches to hopping on one leg :)

ZDoom and (soon) Eternity have additional codepointers, which cover most (if not all) of Hexen monster behaviour.

Share this post


Link to post

Arg, we at least need AI that will keep monsters from zigzagging . . .well, except for maybe the Demon and the Lost Souls.

By the way, the Lost Soul's AI is dumber, right? I've seen two Lost Souls go at it many times, and all of a sudden one will stop fighting the other and sttart attacking me. Huh?

Share this post


Link to post

all monsters have the same 'ai' which isn't ai at all, it consists of the following:

if(I am in sight of the target)
{
   if(I have a short range attack)
   {
      if(I am right next to the target)
      {
         do a close attack
      }
      otherwise(I'm too far away)
      {
         move towards the target
         if(I have a long range attack)
         {
            do a far attack
            move towards the target
         }
         otherwise(I have no attacks)
         {
            walk towards the target
         }
      }
   }
   otherwise if(I have a long range attack)
   {
      do a far attack
      move towards the target
   }
   otherwise(I have no attacks)
   {
      walk towards the target
   }
}
otherwise (I can't see the target)
{
   move towards the target
}
this is of course given that the monster actually has a target. when he doesn't have a target his time is spent doing: 'stand here and don't move".

and that's pretty much it

Share this post


Link to post

Cyb, with this algo, monsters with no short range attacks and with the player in sight will do nothing. Check your block hierarchy :P

Share this post


Link to post
Julian said:

Cyb, with this algo, monsters with no short range attacks and with the player in sight will do nothing. Check your block hierarchy :P


oh very well mister frenchman, I fixed it :P

of course now it has repeated code blocks, so obv the best thing to do would make a far attack function and call that in the two places where the code is exactly the same, BUT, that seems silly since I'm just trying to convay a point :P (but I am stating this anyway just so you don't call me on that later hehe ;) )

Share this post


Link to post

I asked Randy (and gave him the formula) to calculate the distance of the monster and it's eye target and also the light value of the sector containing the target to check if the monster could see the target in dark and distant places before awaikening them by sight, and it could have added an ontional stealth AI to doom, but it is currently ignored. ;-)

We could turn it on MAPINFO or by an option in the game menu.

Share this post


Link to post

Heavy Weapon Dudes and some other enemies strafe and/or back away while shooting you in PrBoom. I'm not sure whether or not it came completely from MBF.

Share this post


Link to post
Sphagne said:

I asked Randy (and gave him the formula) to calculate the distance of the monster and it's eye target and also the light value of the sector containing the target to check if the monster could see the target in dark and distant places before awaikening them by sight, and it could have added an ontional stealth AI to doom, but it is currently ignored. ;-)


Yes, this would be a good improvement. Its just that I fear how this will really rachet up the difficulty of some wads. I have especially exploited the monster's limited ability to target you beyond a certain distance to take out cyberdemons from way off. I shudder to think what would have happened if that limitation was removed.

Share this post


Link to post

Meh, Doom isn't about AI. It's about killing shitloads of monsters. I'm quite happy with mowing down hordes of thick enemies that just stand there and soak up fire, rather than dodging around like a headless chicken. If you want AI, go and play Unreal or something.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×