Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Trilinear

Projectile prediction in monster AI?

Recommended Posts

I'm seeking information about any mods that seek to improve Doom's monster AI where projectile prediction / velocity leading is concerned.

When playing Doom with contemporary controls (WASD), it always grates me that there is now a massive imbalance in difficulty between hitscanners and projectile monsters. Lesser-class zombie enemies have a hitscanner attack that cannot be avoided under any circumstance, while the higher-class demons have projectile attacks that do not take into account the player's trajectory, and as a result can be duped into a 100% misfire rate simply by strafing in a single direction (painfully obvious with the Baron, who is essentially reduced to a harmless flesh blob that takes a lot of punishment).

Share this post


Link to post

Invisibility makes projectile monsters harder. Could be something as simple as giving projectile monsters the ability to always fire as if player was invisible.
The general direction and randomness means you really have to dodge instead of be one step ahead.
Randomness I think would be harder than AI. Even if a monster predicts its shots you would still have an idea of where its going.

Share this post


Link to post

That's an interesting point, I'm sure I'm not alone in deliberately avoiding the Blur Artifact powerups for that reason...

Share this post


Link to post

Fighting a single baron is easy but I think doom2's monsters work great together as a system and compensate for their dumbness. The manc's spread attack and reverent's homing missile add projectile difficulty and variety. Every monster adds 'synergy' (lol) to the whole. Plus different monster projectiles go at different speeds, and come from different distances (far away imps sniping you, close barons shooting you) and the monsters can be spread out instead of herded into a circle, and monsters can infight so aim random directions, all keeping them challenging enough imo (try to not get hit on timeofdeath's reality maps, map02 in the beginning part (while going fast which probably means open all the 'houses' asap). Due to all that stuff it sometimes actually seems like the monsters DO predict where you're going to go. I often half suspect the game cheated and did so when I die).

One simple hack to make projectiles more 'accurate' (with acs or whatever) would be to make them much faster (or play with -fast parameter) of course (but still the accuracy would be relative to distance of the monster from the player assuming the player is continually strafing to the side).

Otherwise I guess it should be possible with ACS. If the game stores the player's speed, get that and the player position every frame and extrapolate based on projectile speed and distance. Or you could probably calculate the player speed yourself by measuring how far the player position in the current frame is from the position in the last frame. But I'm not certain about this stuff.

EDIT: now that I think about it, the final boss map of: http://www.doomworld.com/idgames/index.php?id=12364
had a phase (during mastermind part on UV at least, I think when the spiders were walking around) when their projectiles tried to intercept where you were going to go. I forget how well it worked.

Share this post


Link to post

ACS has a Thing_ProjectileIntercept function that does this, though using it as a monster attack isn't the easiest thing to hack.

I'm not so sure this is a good idea, though. Doom's gameplay revolves around being able to dodge things, and making the monsters fire intercept-balls makes things tougher than you'd think -- I recall one game (Will Rock) that did it on its hardest difficulty, which succeeded in suddenly making the game 10x more frustrating.

I suppose it could work in a custom mod if done right, though. Just if you go that route, it may be best to shoot for a totally different gameplay style instead of just giving intercept attacks to the standard Doom baddies in an otherwise-normal map. Just my twopence.

Share this post


Link to post

It'd be interesting to see some kind of reliable target-leading system. I agree that it would probably work best in a scenario where a different gameplay style was the goal though, not just Doom monsters with altered AI.

Share this post


Link to post

I had a look at the Thing_ProjectileIntercept code to see if it was possible to factorize it with the missile spawn code and have monsters use it.

Then I decided I had better things to do, like trying to get my eyes back in their sockets.

Share this post


Link to post

Doesn't Doom 64's cybie lead his third shot? Can't remember if Absolution/EX implemented it or not, but might want to ask Kaiser.

Share this post


Link to post

Well, if you give the player the "partial invisible" flag on dehacked (I guess can be do on Zdoom too) all monsters will attack him as if he was using the artifact, but his hud weapons will be not affected.
If you could add a flag to hitscanners and Lost Souls to ignore partial invisibility artifact then you'd balance what you want.

I know that flag doesn't exist, but most likely is easier to implement than the prediction thing.

I agree with Enjay about this, I like the idea but not for maps that were designed to be played in classic style. An imp (or baron) predicting my movements would just feel undoomish.
A boss with this would be other story.
I also agree that DOOM difficult doesn't focus on the monsters themselves but in the way the mapper placed them.

If what you want is just extra dificult to the monsters I suggest you to try "Hard doom", it edits all monsters to be harder and can be used on any wad that doesn't modify the default monsters.

Share this post


Link to post
Xaser said:

I recall one game (Will Rock) that did it on its hardest difficulty, which succeeded in suddenly making the game 10x more frustrating.

Heh, I hardly noticed that, minotaurs aside. Probably because almost all the enemies die when you as much as look at them in the wrong way :P

Seriously, almost all the enemies have about 1 HP and die from single shots from the weakest weapons. If they wanted to make a Serious Sam rip-off that's not the way to do it.

Now, if you really want to see shot prediction in action, try Descent 2 (probably Descent 3 as well, haven't played that one much). On Insane difficulty Descent 2 is one of the most challenging games I have ever played, mainly due to souped up Descent 1 AI, which was already quite impressive, and the addition of projectile prediction.

Share this post


Link to post

Heh, I always did find it amusing how easy it was to finish the game pistol-only. Always did like that gun, though, for its apparent power. :P

As for D2, I never noticed it had hit prediction since I can't bring myself to play above Hotshot. I never got far in my attempted Ace runthrough because I was annoyed at how often I had to duck behind things to avoid hits. I'm probably just not good enough at the game (likely), but not being able to go balls-to-the-wall and play an evasive dodging game a la Doom instead of hiding behind corners really took the fun out of it for me.

Eh, I should probably do it anyway just to say I did. Maybe actually getting a good joystick setup instead of going keyboard-only would help.

Share this post


Link to post
Xaser said:

Eh, I should probably do it anyway just to say I did. Maybe actually getting a good joystick setup instead of going keyboard-only would help.


Yes it would. That game requires a joystick with a lot of available axes to work well. Keyboard-only or even keyboard+mouse are not really enough to play it like it's meant to be played.

Share this post


Link to post

I'm not really phased that badly by that problem (I wasn't into the AI thing much), though I know it is possible through decorate to make much tougher versions of those doom monsters to alleviate it somewhat. (for example, making a "level Die" version of a baron of hell that is an extreme pain in the ass comparable to those damned afrits from Scythe 2)

Share this post


Link to post

If you were to make monsters lead their shots, I say you -must- make it rather inaccurate. I've played games where there was perfect prediction, and it's just retarded. It's not that it is frustrating (which is true) but it seems so fake and plastic. When you can see clearly that the angle of the projectile directly correlates with your speed and direction, it looks really unnatural. Whereas, when they are just shooting directly at you it does not.

Interestingly, if you use autoaim, it is true of both monsters and the player that hitscan attacks have a little inaccuracy built in while projectiles don't.

Share this post


Link to post

I agree with magicsofa. However, plenty of the beastiary monsters tend to be very accurate with their projectiles. (considering that said projectiles move very quickly

Share this post


Link to post
Gez said:

Yes it would. That game requires a joystick with a lot of available axes to work well. Keyboard-only or even keyboard+mouse are not really enough to play it like it's meant to be played.

While keyboard only is pretty much impossible, keyboard+mouse are enough for me. Playing through D1 in Dosbox right now with my old setup, haven't played it in years yet it feels fine and natural.

Mouse for turning, primary+secondary on the buttons.
WSAD for strafes, QE rolls, Space forward, Shift backward.

You can do everything with it after you get used to it.

Will fire up D2 again when I'm done and see if Dosbox can handle the DOS version better than true DOS (I remember getting multiple crashes on boss maps which forced me to use Windows to get through them, glad the saves were compatible).

If any other game forced me to use the sort of hit and run, hide and seek tactics that D2 requires to get through on Insane, I'd probably get bored out of my mind, but D2 strikes the perfect balance between pitting you against rather unfairly powerful AI and giving you the right tools to deal with every situation. The D2 weapon set is simply awesome, thanks to stuff like the guided and mercury missiles, and gauss, phoenix and omega cannons.

As for perfect vs inaccurate prediction, I'm all for perfect prediction. Doing it that way adds only one extra element you need to account for when strafing, the need to switch directions from time to time, which is why it worked fine in D2 and say, Zone Raiders (and it didn't feel fake, since the enemies were all robots and machines). If you use inaccurate prediction, dodging will become even more of a headache than with just the blur sphere.

Share this post


Link to post

EDGE can do this, if people want to see it in action. I believe the feature was actually introduced in DosDoom (I seem to recall it was one of the demos for DDF).

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
×