Jump to content
The Dark Mod Forums

AI Movement Changes Beta


grayman

Recommended Posts

It would be something else if the door would be closed automatically.

 

I hadn't considered auto-closing doors. I'll have to look at the code to see how they behave when there's a door queue. I might need to change something.

 

Edit: On second thought, since the door can't be aware of who's using it, it's going to close regardless of whether anyone's walking through the doorway or not. Or perhaps the Inventors Guild sells motion detectors?

Link to comment
Share on other sites

  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

AI now close doors if they're the last one through, regardless of whether the door was initially found open or not.

 

I like this (and Tels' suggestions to make other situation-specific choices possible to too).

 

1.04 is scheduled to enter code freeze Saturday

 

I love this.

 

...

 

 

From the ever-persistent easy-for-me-to-say dept:

 

I think I might have mentioned (I'm sure I meant to) how with all of these great behavior modifications it would be great to attach some new grumbles/vocals.

Link to comment
Share on other sites

... with all of these great behavior modifications it would be great to attach some new grumbles/vocals.

 

I agree. It's serendipity when a Noble is waiting on a door queue and a Pagan walks through the door.

 

The Noble says "Move along, there."

 

And the Pagan replies, "Yes, Sir."

 

Some 'impatient' comments specific to door queues would be good to have. Especially for the upper class.

Link to comment
Share on other sites

with all of these great behavior modifications it would be great to attach some new grumbles/vocals.

 

Adding new vocals is not particularly easy. You either have to build them from the vocals which already exist, or go back to all the actors and get them to record new ones.

 

That said, there are plenty of vocal barks recorded that aren't actually used in game yet.

Link to comment
Share on other sites

This seemed to go OK for quite a while. I was flying about trying to see where AI were patrolling. For a while the only anomaly I saw was a woman standing on the stair facing as if she had been going down the stair but just standing. I saw no other AI around. Within seconds of my arriving (noclip notarget so not affected by me) she turned and went back up so that was OK. Presumably she had anticipated being blocked by another AI before I arrived and I suppose he must have moved off.

 

The main problem was the usual double corner at the bottom of the stairs. The first screenshot shows how it was when I arrived. The male AI is just standing facing the wall. I assume he wanted to go out that back door following the blue line. The woman I assume was coming in, intending to follow the yellow arrow. There is room but not much. So she was circling just inside the door instead as in screen 2. Sometimes she turned and went right out of the door and I thought she was going back the way she came but as soon as got down the steps she turned and came back in and resumed circling.

 

There were no other AI around - whether by chance or whether they were avoiding the jam I don't know. It seemed hopeless as for several minutes the woman was trapped in her routine. But at some point in her circling she managed to find the gap behind the man. However, she didn't proceed forward but started circling further inside somewhat behind the man and towards the door - see screen 3. This only last 20 or 30 seconds then she broke clear and proceeded forward into the house on what I think must have been her original path. As soon as she was gone the man recovered and went out the back door.

 

So it's working but needs refining maybe to find a route better I've no idea how!

 

post-400-129676876481_thumb.jpg post-400-12967687769_thumb.jpg post-400-129676878851_thumb.jpg

 

This has taken me many minutes to process the screens and write this and I left the game running. There were no jams when I just looked. It was all clear in that area.

 

They are shutting that back door better - it was mostly being left open before.

 

I'm specifically looking for trouble. An interesting test would be to see how often normal play comes across serious jams even if temporary. I mean a permanent jam a player will come across eventually but one that last 3 minutes maybe not.

 

I'll do some more testing tomorrow probably cause a bad alert there to see if they recover.

Link to comment
Share on other sites

So it's working but needs refining maybe to find a route better I've no idea how!

 

 

I think this is what happened ...

 

1. The man originally thought the woman had room to pass behind him, so he stopped, stayed solid, and started waiting for her to pass.

 

2. The woman entered through the back door, so she won't try to go back through it until 5s have passed. This gives her a more likely chance of spotting the interior door, where she really wants to go. She tries to get to it, fails, and circles back to try again. She does this repeatedly.

 

3. The timer on the woman's use of the back door expires, pathfinding sees the back door, and sends her through it. She exits the back door, decides to try her original goal again, turns, and walks back into the house.

 

4. Meanwhile, the man is probably waiting for the woman to leave. He has a fail-safe timer that will make him move again, even if the woman's still nearby. But when it expires, the woman's antics quickly toss him right back into limbo before he has a chance to move.

 

5. Pathfinding and physics finally give the woman a way out of the mess.

 

6. The man sees the woman has left, and continues on his way.

 

 

 

And yet, should these two once again find themselves going through these doors at the same time, they might get through the area w/o any problems.

 

If the man had decided to become non-solid instead of solid (step 1 above), the woman would have passed through him and continued on, and the problem would never have occurred.

 

Probably what needs to be done is to increase the chance of going non-solid by increasing the amount of space the standing AI thinks the moving AI needs to get around it.

 

I don't want them to go non-solid all the time, because when it happens, it disturbs the reality of the scene. It's especially bad when there's a jostling crowd searching for the player.

Link to comment
Share on other sites

TFor a while the only anomaly I saw was a woman standing on the stair facing as if she had been going down the stair but just standing. I saw no other AI around. Within seconds of my arriving (noclip notarget so not affected by me) she turned and went back up so that was OK. Presumably she had anticipated being blocked by another AI before I arrived and I suppose he must have moved off.

 

She would be standing for one of two reasons:

 

1. She's waiting for someone to leave her vicinity.

 

2. She's on a door queue, awaiting her turn.

 

Since there were no other AI around, it wouldn't have been #1.

 

Is there a door w/in 150 units from where she was standing? When she started moving, did she very soon walk through a door?

Link to comment
Share on other sites

The main problem was the usual double corner at the bottom of the stairs.

 

Nonsense, they were dancing! :D

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

I always thought there was something going on between those two. ;)

 

Anyway, no, the woman on the stairs was about half way not near any door. Strange now I think about it. Impossible to believe she had been at the back of a very long queue that was now well gone. She would be going down to one of those doors. Suppose an AI had been using the door 5 seconds before say but I didn't see him. Would she pause that far away in anticipation that if she got too close it might cause a jam?

Link to comment
Share on other sites

Anyway, no, the woman on the stairs was about half way not near any door. Strange now I think about it. Impossible to believe she had been at the back of a very long queue that was now well gone. She would be going down to one of those doors. Suppose an AI had been using the door 5 seconds before say but I didn't see him. Would she pause that far away in anticipation that if she got too close it might cause a jam?

 

Incoming AI stop 150 units from a door's origin if there's someone on the queue ahead of them. If another AI comes along, you'll see it stop next to the previous AI, not behind it. So she wasn't at the end of a very long queue.

 

She would only stop if she was in a door queue or if she needed to resolve a block w/another AI by standing still and letting them pass. But as soon as they're 60 units past her, she should have started moving again.

 

The only thing I can think of is that she lost track of who was passing her (not sure how this could happen), and the timeout for general block resolution went off. That's 20s. After that, she's free to move again.

Link to comment
Share on other sites

You should add some kind of logging on each decision branch, so you can be sure what is happening.

I've read of a game a few years ago that used the memento pattern so that they were able to record and later "fixate" the random sources of input so that they could always reproduce a bug report. More, they were able to replay the state after modifying the code and seeing what happened.

 

Doubt it is possible to you since you don't control all of the source, but a simple threaded file logger in the algorithm should be possible no?

Edited by i30817
Link to comment
Share on other sites

Well, I went in and riled up a few mobs of CityWatch Mercs (and the occasional Citizen).

 

There was a lot of weird behavior, to be sure, but I guess that's down to scrutinizing them like we are. I saw plenty of situations which didn't follow what is "supposed-to-happen" (the AI wasn't always closing the doors, for instance). It seems to me different AI have quite different behavior, and this, when they get bunched results in some of them still running around like the proverbial headless chickens while others Vogue...

 

But what did happen without fail was that they eventually reached whatever timeouts applied and they dispersed and/or at least made room for things to loosen up enough that the weird, wild chaos subsided.

 

...

 

A couple of different humourous scenarios can arise when noclipping whilst intentionally stirring up a frenzy:

 

1. The Chorus Line - this happens if a lot of the mob are set rock throwers -- they'll all step forward (I suppose part of the pre-rock-throwing animation) as one and sheathe as if choreographed by Bob Fosse. One Singular Sensation.

 

2. If they aren't rock throwers, they may gather 'round and start swinging wildly and start dishing out a lot of collateral...

 

...

 

IOW, I think this is going to be the kind of thing that will never get perfect. And we could probably report back endlessly.

 

Things do still get awkward and irregular and down-right ugly looking, but the main thing is they do eventually resolve themselves thanks to the time-outs and other bits of logic.

 

What needs to be addressed, IMNHO, is further back: something crept into 1.03 that is causing such far-and-wide alerts that these tremendous pile-ups are happening almost routinely.

Link to comment
Share on other sites

I just set up a major alert in that infamous stair well. Quite a commotion and fairly reasonable. And it cleared up beautifully and almost too quickly (!) with AI moving off in different directions. They came pouring out the back door like a cinema where the movie had just ended. Only two remained - a woman stood close to the closed inner door, waiting to go through. Nobody on the other side. Nobleman circling behind so she couldn't back off. He was partly moonwalking against her then circling. Don't know why he didn't queue but I guess the door was open when he 'decided' to go through then found he couldn't. Anyway, within 20 seconds she timed out, reached for the door and opened it and went through. He soon followed.

 

I'm pleased with that. Not every situation will likely clear so well but I think we should go with this in the next update and worry about possible refinements later. Good job grayman. :)

 

Also very noticeable I got decent frame rates throughout this. I don't think I quite had the 20-odd AI as my last test but there must have 16 or 18 at least.

Link to comment
Share on other sites

Glad to hear situations are resolving themselves.

 

It certainly needs more work. Preventing bad situations requires more anticipation in pathfinding and more use of secondary ways to reach a goal.

 

We also have to realize that the way we're testing this is to throw a lot of AI into the pot to see what happens. It's exposing the worst-case scenarios very well. A regular mission might not have more than a few AI in the same place at the same time, so those should look more like normal human behavior.

 

Also, the alert propogation issue is probably compounding things.

 

As for the synchronized rock throwing, there's already a bugtracker issue for that: 2400.

Link to comment
Share on other sites

Also very noticeable I got decent frame rates throughout this

 

Yes, even with all the activity, I had a decent experience FPS-wise too. Of course, flying about (no-clipping) in such full-featured environs is a real limits tester, so I had some lags (and even a crash) but not due to these enhancements, I'm sure. VP bursting or summat.

 

...

 

What I wanted to mention, as I was reminded by the quote above, is a little side-note (maybe this is common knowledge but it was a first for me {not being a console diver much before}): if you turn on noclip while in the water? You move very very very slow. :mellow:

 

...

 

...I think we should go with this in the next update and worry about possible refinements later. Good job grayman. :)

 

I'm thinking all this experience with the code-base will serve you well (and by extension, of course, the community) in your venture into The Persistence Problem. ;)B);)

Link to comment
Share on other sites

The next iteration of the movement changes is now ready. Hopefully this will be the final one before we enter code freeze and 1.04 beta testing.

 

A new 1.03 Windows DLL is here:

 

http://www.mediafire.com/?uq0wa9grk7w874t

 

 

The changes are committed to SVN at rev 4553.

 

A new tdm_game01.pk4 is committed to SVN at rev 11593.

 

Today's changes include:

 

 

1. Fixed rare crash when an AI resolves a block w/another AI and returns to handling a door.

 

2. Higher-ranked AI will walk around a lower-ranked AI that’s slower than them and walking in the same direction.

 

3. Less treadmilling against func_statics.

 

4. Less jostling when an AI walks through a door and encounters another AI.

 

5. An AI that gets hung up on another AI while trying to open or close a door will now “reach around” the other AI to open/close the door.

 

6. A better chance of getting past an AI that stands still to help resolve a block.

 

 

Thanks to everyone who tested, especially Fidcal, who threw the Mongol Hordes at it.

 

And a special thanks to Queen and Bruce Springsteen, who provided today's music while I was working.

 

I'm looking forward to pulling a few very tiny itty-bitty teeny-weeny issues off of bugtracker for a while. cool.gif

Link to comment
Share on other sites

Okay, took the newest gamex86.dll there for a test-drive.

 

A quicker look (spent about 30-45 minutes stirring things up and standing back and watching) and I'd say maybe a little less confusion. but still some. In particular I'll mention an archer seemed to have to be pushed out of the way as he never got out of the way.

 

I found a dead guy who I didn't kill. I can't say where (well I could but that would involve spoilers and such as I'm doing this with Fidcal's alpha-phase mission)...

 

Anyway, this guy is one of those who never should have been excited to begin with (a far-out-alerted)...

 

I think things are certainly ready for 1.04, as far as these enhancements go, and then see how the broader community experiences them. But, again, I think that resolving the mass hysteria thing is a must. If you can try and get that fixed for 1.04 it'll certainly help everything.

 

I'm looking forward to pulling a few very tiny itty-bitty teeny-weeny issues off of bugtracker for a while.

 

Ha. You're as easy as Sotha... with his "I'm going to take some time off" every time he finishes a FM. :P

 

You know that Persistence Problem is your baby. You're ready for it. You need it resolved. You were made for it. :laugh:

 

All in fun (with the both of you guys).

Edited by Aprilsister
Link to comment
Share on other sites

I found a dead guy who I didn't kill. I can't say where (well I could but that would involve spoilers and such as I'm doing this with Fidcal's alpha-phase mission)...

 

Once Fidcal's mission is released, post a note somewhere about where the dead guy is, and I'll see if it has something to do with interleaved thinking. Perhaps there's a situation my previous changes don't handle.

Link to comment
Share on other sites

Tried to play through heart on new SVN branch. I met a few problems with AIs...

 

The first one is minor: guards got stuck forever in a doorway.

 

 

 

 

guardsstuck.png

 

 

 

The second one is more serious. The melee guard does not attack me - just runs into me. I've seen an entry in bugtracker entries with similar description...

 

 

 

 

guarddoesnotfight.png

 

 

 

 

Link to comment
Share on other sites

It's not clear exactly where that first image is.

I see the cook I think. I'm guessing we are in a side room (housekeeper?) looking out into a corridor? If that is the housekeeper's room then there is a door somewhat to the right out of sight. They don't actually go through the shown doorway. So are they trying to get through the door to the north? And are there other AI on the other side of the door? How long did you wait to see if it timed out?

Link to comment
Share on other sites

It's not clear exactly where that first image is.

I see the cook I think. I'm guessing we are in a side room (housekeeper?) looking out into a corridor? If that is the housekeeper's room then there is a door somewhat to the right out of sight. They don't actually go through the shown doorway. So are they trying to get through the door to the north? And are there other AI on the other side of the door? How long did you wait to see if it timed out?

 

Both images are taken at the same place. You can see the doorway from the first image on the left wall in the second image. The door is between the corridor and kitchen. There's really another opened door to the left, but they don't use it.

 

The tough (why has he so much HP?) guy in white is CooksAssistant I think. He is the one guilty for being stuck. The console repeatedly shows message: "AI MoveStack contains more that 100 moves! (CooksAssistant)". I waited for several minutes with no result. All in all 4 guys are involved: CooksAssistant in white: stuck, does not move; servant closer to me: tries to run away, runs like mad; two guards on the other side: I guess they are searching for me, but cannot pass through the cook.

 

 

I tried to kill servant running around and toggled lantern on. The remaining three guys are stuck again. The guards are clearly in combat state.

 

 

 

 

guardsstuck2.png

 

 

 

Saves are on FTP:

 

"Guards Stuck", "Guard does not attack"

 

 

Link to comment
Share on other sites

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

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 2 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 5 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...