Jump to content
System downtime for updates - Sunday 13 July 2025 ×
The Dark Mod Forums

Recommended Posts

Posted

My test AI will happily walk through a certain AAS box to get to a path corner, but then walks carefully around it to get back. It's a big AAS box, so the effect's not subtle.

 

post-29566-0-99486800-1390249191_thumb.jpg

 

In the pic, he's just crossed successfully through area 29 into area 28 going left to right, but to get back to the left hand side of area 29, he's pressing up against the far wall to walk around the box rather than cross it.

 

The floor is a lumpy patch over a caulk wedge. It looks very bumpy but the maximum gap between it and the caulk wedge is 20 units. The underlying brush isn't broken under the problem area, so there's no invisible "step". There's no visportal or intersecting brush.

 

Tweaking the caulk wedge verts hasn't fixed it. Nor has moving the path corners, including z-axis-wise. What *does* seem to fix it is adding an extra path corner in the middle of the offending AAS box. Then the AI paths through it fine both ways.

 

Any idea how to understand or avoid this problem? There's a second spot in my map where it seems to be happening too, though I haven't done as many tests yet as I have with the one above. If I'm somehow messing up TDM's shortest-path calculations, I could end up with lots of pathing bugs :huh:

Posted

The pathfinding math going in one direction can very well be different from the math going in the other direction.

 

I've seen plenty of situations where AI pick what I would consider to be the least direct route from A to B, especially when several choices are available to them. I've seen them enter a room with two doors by picking the door farthest away from them, instead of using the one they're standing next to.

 

So there's really not anything we can do with pathfinding short of redesigning it, which is a big job.

 

Your use of an extra path_corner is one way to "guide" them. Another would be to use monster_clip to force them along a particular path. But in an open area like your example, monster_clip would be a problem when searching or trying to combat you.

Posted
The floor is a lumpy patch over a caulk wedge. It looks very bumpy but the maximum gap between it and the caulk wedge is 20 units.

 

20 units probably is causing problems, I'd reduce to <=16, see http://wiki.thedarkmod.com/index.php?title=Pathfinding#monster_clip_:_Adding_AI_pathfinding_to_Horizontal_Surfaces

 

I'd also change the caulk to monsterclip, I've found they do affect AAS differently (I had AI refuse to go up brush stairs, even with a nodraw ramp, until I made monsterclip stairs).

 

You can put islands of monsterclip below high spots in your patches where the disparity in height is greater than sixteen. Not that some AI can't step up over 14 (and perhaps less) per that wiki article, so they might go down fine and not want to return if there's a step up that way.

 

Any idea how to understand or avoid this problem?

 

Experience. :-) There's a reason I worked a lot with patches and outdoor landscape for my first FM. Future FM creation will feel easy in comparison.

 

The command, "timescale 2" is a great way to test pathing in half the time, it doubles the speed of almost everything (not sounds). It can throw off the physics though, so don't rely on it exclusively, and numbers greater than 2 are supposedly even less reliable. Use "timescale 1" to return timescale to normal (it's a factor).

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Posted

Thanks for the advice guys. When you think you've tried everything, ask :) The timescale tip is something I'd not come across before and it's sped up my testing cycle a LOT.

 

Results of latest testing:

  • The extra path corner is fine for fixing a patrol, but not for allowing an AI to chase the player. They still take the long way round once they leave their patrol route.
  • Changing the AI type didn't change anything.
  • Using monsterclip or nodrawsolid instead of caulk didn't change anything in this spot.
  • Varying the types of adjacent walkable brushes (i.e. striping between monsterclip, caulk, and nodrawsolid) doesn't affect the AAS boxes or the pathing.
  • Adding an extra caulk wedge fixed both patrolling and chasing, but it also caused the big AAS boxes to be split up into small ones so it was unclear whether the height difference was the problem, so I tried more tests:
  • Splitting the original caulk wedge into 6 small ones didn't affect the AAS boxes or the broken pathing.
  • Lowering the verts of one of the central split wedges by an couple of units also caused the AAS boxes to be split, and it fixed the problem too. NB This increased the gap between the caulk and the patch.

So I've still not worked it all out, but I'm much happier that I can fix this problem where I find it. My take-away lesson is, if AI are pathing around a big AAS box, add a little brush or do something else to break up the AAS boxes. And tweak stuff till it works!

 

ps: If I seem to be taking too long over this, it's because of past experience. The only other time I ever tried to make a FM for any game was 8 or so years ago with T3ED. I put months of work in, but then couldn't get AI to walk between rooms at all. My navmesh looked perfect, but neither I nor any of the experienced people on ttlg could make AI path around my map, and I ended up abandoning the map and mapping for a decade! This time round I've had test AI exploring every corner almost since day one. So happy to have found TDM now and to be giving it another go. TDM is so much better!

Posted

Thanks for providing feedback, interesting results, similar to some of my own. Yes, the chasing behavior is different, but in my map, they were willing to chase happily where they were not willing to path normally. Go figure.

 

Same conclusion, not working as expected? Change it a bit. :-)

"The measure of a man's character is what he would do if he knew he never would be found out."

- Baron Thomas Babington Macauley

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...