As I understand it, currently when hit from something outside of LoS, actors start moving at random. Usually though, that is less than effective - they tend to dance around a bit, but not move all that much.
My suggestion is to have them pick a direction at random as usual, but then keep moving in it for a bit. Either it moves toward the player, gaining LoS sooner or later, or it moves away, getting out of range. That should tend to be more effective as well as interesting.
AI random walk: keep going in one direction
Moderator: Moderator
AI random walk: keep going in one direction
Ghoul never existed, this never happened!
Re: AI random walk: keep going in one direction
I think that optimal would probably be moving to the last point you were seen at(as the AI, I believe, does), then, rather than moving around in an increasing circle area(which is, I believe, what the AI does right now), RNGing a random point in that circle area to move to, then picking a random direction from there, then doing the whole thing again after X(20-40) turns pass, with the circle now bigger.
That way, they'd move within a general area, but they'd also spread out some. Then they'd move back in, spread out, move back in, spread out...
Kinda like a real search pattern, only less intelligent. Which feels right.
That way, they'd move within a general area, but they'd also spread out some. Then they'd move back in, spread out, move back in, spread out...
Kinda like a real search pattern, only less intelligent. Which feels right.
Re: AI random walk: keep going in one direction
I was mainly thinking about the case where you haven't been seen at all.
Not sure a search pattern is a good thing for the AI to use. If it can't close in with the player, the next best thing is to get the hell out of dodge, and going in a straight line has the best chances to do that, I think.
Not sure a search pattern is a good thing for the AI to use. If it can't close in with the player, the next best thing is to get the hell out of dodge, and going in a straight line has the best chances to do that, I think.
Ghoul never existed, this never happened!
Re: AI random walk: keep going in one direction
If they haven't seen you yet, isn't one place as good as another? Why not have them stand still, if they haven't interacted with you yet?
Having every enemy on the map mill around aimlessly is a notable processor hit-vaults specifically got commanded to stand still because of that. What's the gain?
Having every enemy on the map mill around aimlessly is a notable processor hit-vaults specifically got commanded to stand still because of that. What's the gain?
Re: AI random walk: keep going in one direction
No, I don't propose having monsters shuffling back and forth in unopened vaults:
Hitting something around a corner with an AoE spell is what I'm talking about. The player knows it's there through whatever method, it hasn't seen the player, cast Glacial Vapours or something similar, profit.jotwebe wrote:As I understand it, currently when hit from something outside of LoS, actors start moving at random. Usually though, that is less than effective - they tend to dance around a bit, but not move all that much.
Ghoul never existed, this never happened!
Re: AI random walk: keep going in one direction
Ah, you mean short term handling of out of LoS damage.
Seems like the same solution as was proposed with summons-having your location passed to the enemy, with a fuzz radius-would work for that. Though, you'd have to do something about DoTs constantly passing your location...hmmm.
Really, enemies should have a vague idea of where that Gravity Well or whatever came from. The player does. If it's worse at it than the player...well, that's normal.
Maybe your idea does work better in practice, though, for that particular problem. I hadn't thought of the constant location passing...
Seems like the same solution as was proposed with summons-having your location passed to the enemy, with a fuzz radius-would work for that. Though, you'd have to do something about DoTs constantly passing your location...hmmm.
Really, enemies should have a vague idea of where that Gravity Well or whatever came from. The player does. If it's worse at it than the player...well, that's normal.

Maybe your idea does work better in practice, though, for that particular problem. I hadn't thought of the constant location passing...
Re: AI random walk: keep going in one direction
Aye, yufra or I (or both) will improve the wandering AI (and responses to unseen stimuli, summons, etc.). Wandering was added in a late release candidate for v1, and so was kept simple to avoid possibilities of bugs (didn't want to further delay v1!) and let us move on to other things to fix and improve for v1.
darkgod wrote:OMFG tiger eye you are my hero!
-
- Sher'Tul Godslayer
- Posts: 2000
- Joined: Fri May 07, 2004 8:26 pm
- Location: Nahgharash
Re: AI random walk: keep going in one direction
So how exactly WILL this impact lag on slower computers? Not dealing with huge lag in vault levels anymore is useful, but if you start tossing huge amounts of complexity into the AI of enemies, every level becomes what Dreadfell used to be, and the infinite dungeon still is...tiger_eye wrote:Aye, yufra or I (or both) will improve the wandering AI (and responses to unseen stimuli, summons, etc.). Wandering was added in a late release candidate for v1, and so was kept simple to avoid possibilities of bugs (didn't want to further delay v1!) and let us move on to other things to fix and improve for v1.
Currently playing under the name Aura of the Dawn 4 down, 227 to go!
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
Proud author of Orc Pit Restoration Project, Faction Allies, Dwarven Adventurer addons
SadistSquirrel wrote:DarkGod has two arms, one with an opened hand, one with a closed fist. You got the fist.
Re: AI random walk: keep going in one direction
Shouldn't be much at all. I have already implemented an optimization that results in a noticeable speed gain for levels with many npcs. There are more optimizations that we know we can do, and some that we may be able to do. Again, these were slated to be done post-v1.Crim, The Red Thunder wrote:So how exactly WILL this impact lag on slower computers? Not dealing with huge lag in vault levels anymore is useful, but if you start tossing huge amounts of complexity into the AI of enemies, every level becomes what Dreadfell used to be, and the infinite dungeon still is...
darkgod wrote:OMFG tiger eye you are my hero!