Jump to content
The Dark Mod Forums
Sign in to follow this  
zergrush

AI reactions and reasonable doubt

Recommended Posts

@Grayman, once you fix the bug, would it be possible for you to produce some videos showcasing different time settings so we could have an idea? I'm fine with Wesp5's suggested times, but it would it would still be nice to have a look at how it behaves in game.

Share this post


Link to post
Share on other sites

Without making any code changes (i.e. NOT fixing the "bug"), I played with the vision factors to obtain the 1-2-4-8s suggestion (time it takes for the AI to draw his weapon and start moving toward you).

 

So that I don't have to make a multitude of movies for different situations (I try to avoid making movies), you can make these changes to your Darkmod.cfg file to see the results, and test them in whatever situation doesn't seem right to you in 2.07. (i.e. fully lit in CutN, AI far away)

 

seta tdm_ai_vision_hardcore "0.544"
seta tdm_ai_vision_challenging "0.272"
seta tdm_ai_vision_forgiving "0.136"
seta tdm_ai_vision_nearly_blind "0.068"
To get back to the 2.07 settings, just delete these lines from your Darkmod.cfg and run the game. The 2.07 settings will be restored.

Share this post


Link to post
Share on other sites

Here are the videos showcasing the time cfg changes suggested by Grayman. There seems to be little noticeable different between Challenging and Hardcore, but the differences are pretty clear on Forgiving and Nearly Blind. AI also seems to react in a weird way in the Bakery Job in Forgiving mode. It goes in and out of the building and takes notice of the player halfway in.

 

Last thing to take note: distances don't seem to taking much effect into the equation. If you watch the ending of the Bakery Job video, I load Nearly Blind difficulty and get close to the AI guard. He does not seem to notice me at all in full light standing right in front of him, and there's no time difference between being at a distance and being at close range from the AI.

 

https://youtu.be/oImW0RbbDFc

 

https://youtu.be/7LeSlUBjfOA

Share this post


Link to post
Share on other sites

Doing the test near a door is going to give skewed results, as the door-handling routine is likely to make the AI lose track of you.

Share this post


Link to post
Share on other sites

CutN looks fine.

 

Not sure what's going on with the Bakery Job door. I see an example of an AI getting confused, which happens now and then.

 

And distance is always part of the equation.

Share this post


Link to post
Share on other sites

CuTN does look fine, but enabling this configuration leads to poor AI at close range as seen in the end of the Bakery Job video. I'll record another example from Tears of St Lucia later on.

Share this post


Link to post
Share on other sites

Doing the test near a door is going to give skewed results, as the door-handling routine is likely to make the AI lose track of you.

 

It's not so much the door handling as it is the searching. If the guard turns away from you, and you're not in his FOV, he isn't going to register you during those frames. So it's going to take a bit longer to continue ramping up.

 

I think there's an expectation that if the player is fully-lit and close by, that the AI will easily spot you and climb quickly to alert index 5 (combat) regardless of how good his vision is. Perhaps that's a factor that should be added to the current calculations. (??) That change, however, might work to the detriment of the player in less-than-fully-lit situations, which means some maps will play differently than they have for the past 6 years.

Share this post


Link to post
Share on other sites

I did some close range testing, and you're right, it does seem to be working fine for the most part, although I'm not entirely comfortable with the excessive delay on Nearly Blind:

 

https://youtu.be/x23T9zw-Jwo

 

I think there's an expectation that if the player is fully-lit and close by, that the AI will easily spot you and climb quickly to alert index 5 (combat) regardless of how good his vision is. Perhaps that's a factor that should be added to the current calculations. (??) That change, however, might work to the detriment of the player in less-than-fully-lit situations, which means some maps will play differently than they have for the past 6 years.

I always take it players engage into a simulation considering three important factors by this order:

 

1) What does the player expect based on the knowledge he has from reality?

2) What does the player expect based on what he knows from video game logic?

3) What does the player perceive as being a fair challenge given the previous points?

 

I think knowing how to balance a certain dose of common sense realism with just enough fun and challenge is a core pillar of good gameplay design. Based on this, I think certain aspects of AI behaviour should be difficulty agnostic. If you bump against an AI, it should immediately trigger level 4 or 5 awareness. The same should happen if you jump into full light at less than 3 meters distance from AI. Conversely I expect AI to hold a reasonable doubt if I'm at a considerable distance, even if in full light. However, audio cues should always be provided to make the player aware he has been detected, so as to make it fair even if not fully realistic, and so on.

 

I don't particularly think this would be something that severely alter how most maps are played, and then again, it could always be tested. So I think that we're on the right track to balance AI visibility just fine.

Edited by zergrush

Share this post


Link to post
Share on other sites

Forgive me about being picky but this:

knowing how to balance a certain dose of common sense realism with just enough fun and challenge is a core pillar of good gameplay design.


is actually more like this in game design:

knowing how to balance fun and challenge with just enough sense of realism is a core pillar of good gameplay design.

 

(unless you design a simulator). That applies even to things like CGI in movies.

Also, every change like that shouldn't be based on guesstimates, but on really thorough testing and tweaking, as it's a core mechanic and affects everything else.

Share this post


Link to post
Share on other sites

Exactly, which is why I have been going back and forth testing AI and making these videos. I'm thinking of making a small map with light switches and guards placed on corridors to make the testing of AI reactions much more easy and standardized in the future. Since this is such an important component of TDM I found it surprising this bug managed to slip through since 2.04, which in my opinion calls for more thorough testing of AI every time a new release is produced. If you can also test this yourself in the meantime, please record a video and let us know your input!

  • Like 1

Share this post


Link to post
Share on other sites

Since this is such an important component of TDM I found it surprising this bug managed to slip through since 2.04

 

This is a hobbyist gamedev project, bigger blunders have and ultimately will happen ;) We're kind of lucky there's always someone who notices when something goes wrong, whether in the dev team, or from mapper/player perspective :)

Share this post


Link to post
Share on other sites

I did some close range testing, and you're right, it does seem to be working fine for the most part, although I'm not entirely comfortable with the excessive delay on Nearly Blind:

 

 

 

Yes, something isn't scaling properly there. It appears that the same amount of delay is being applied regardless of distance which feels wrong. Even at the nearly blind setting, a guard standing two feet away should immediately recognize the enemy.

 

If possible, I think the delay should scale based on distance. Now, these numbers are not meant to be accurate...just as an example of what I'm thinking. For the most part, except for hardcore, the closest distance would have the same reaction time and scale from there.

 

 

 

nearly blind

2 meters or less ------1s-------5 meters -----2s------ 10 meters-----2.5s----- 15 meters ------3s------20+ meters----3.5s

 

Forgiving

2 meters or less ------1s-------5 meters -----1.5s------ 10 meters-----2s----- 15 meters ------2.5s------20+ meters----3s

 

Challenging

2 meters or less ------1s-------5 meters -----1.25s------ 10 meters-----2s----- 15 meters ------2.25s------20+ meters----2.5s

 

Hardcore

2 meters or less ------.5s-------5 meters -----.75s------ 10 meters-----1s----- 15 meters ------1.25s------20+ meters----1.5s

Share this post


Link to post
Share on other sites

I found it surprising this bug managed to slip through since 2.04...

 

We do a lot of testing of each new TDM release, and we depend on feedback from the folks doing the testing. If no one complains about a particular issue, then that issue remains "hidden" until such time that someone does complain. In this case, since it took 6 years for someone to notice something was off is sort of a testament to how robust the code is, and the fact that most players tend to avoid fully-lit situations stretched out the discovery time. That's not to say that covering the fully-lit situation is unimportant, but given the triage nature of bug fixing, we prioritize the problems that bring lots of complaints, and pass on the ones that are noticed only occasionally until we have time to address them. AI behavior when the player is fully lit apparently is not something that bothered people enough to cause a flood of complaints in this area.

  • Like 1

Share this post


Link to post
Share on other sites

The AI will never see you as an enemy "immediately". There will always be a short period of reaction time entering combat state where the AI pauses to assess what he's seeing.

 

I think I expressed this back in the day as what to expect if you jumped down right in front of an AI. His reaction is going to be "Huh? What the hell is this? Hey! I found him, brothers!! To me!!". That thought process is going to take a bit of time.

  • Like 1

Share this post


Link to post
Share on other sites

Once I get out of WS5's beta test and release it, I'll start looking at the visibility issue in detail for 2.08.

 

Until then, I welcome all test maps folks want to contribute, plus videos they have time to post. I'll add these to my already existing test maps and see if I can come up with an improvement that doesn't cause agita for existing missions.

Share this post


Link to post
Share on other sites

 

I think I expressed this back in the day as what to expect if you jumped down right in front of an AI. His reaction is going to be "Huh? What the hell is this? Hey! I found him, brothers!! To me!!". That thought process is going to take a bit of time.

 

That's how the original games did it. The AI would jump back and be like..."What the bloody hell?".

Share this post


Link to post
Share on other sites

 

That's how the original games did it. The AI would jump back and be like..."What the bloody hell?".

In fact, we have LGS's discussion of that:

 

 

Erin: Perhaps this has already been considered/taken care of, but if your invisibility runs out while you are standing in front of (a) guard(s) will they react appropriately, or will thier usual "they've spotted you" reaction just come off as canned...? I guess I'm saying perhaps there is a large surprise element that might be lacking...

 

Tim: Aha, and yet there is a notion of "surprise" in the AI spec which is being implemented even as we speak, so that in any case where you reveal yourself to an AI too suddenly, he'll be surprised.

 

Ha HA!

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Share this post


Link to post
Share on other sites

The AI will never see you as an enemy "immediately". There will always be a short period of reaction time entering combat state where the AI pauses to assess what he's seeing.

 

I think I expressed this back in the day as what to expect if you jumped down right in front of an AI. His reaction is going to be "Huh? What the hell is this? Hey! I found him, brothers!! To me!!". That thought process is going to take a bit of time.

Yeah, I agree with this. But indeed, let's do some further testing in the meantime.

Share this post


Link to post
Share on other sites

@Grayman, I found an interesting one while playing Down by the Riverside. I'm playing this on Forgiving while using the adjusted AI reactions configuration you posted here. At an early section of the level one AI is apparently able to see you through a wall corner. Now this guard is a notoriously hyper-aware one, as far as his mistrust and reactions go, but even if the player is fully lit, getting spotted through a plain blind angle makes no sense. The question now is whether this is a map bug or game one.

 

I've attached the save as well, since this is an easily reproducible one.

 

https://we.tl/t-XVDqbmOmuG

 

https://youtu.be/u04QLx5bWoU

Share this post


Link to post
Share on other sites

You're moving around. Perhaps he heard you.

 

Edit: Since you have a savegame, try loading it, then immediately typing "inaudible" on the console. This suppresses all suspicious sounds from the player. If he spots you again through the wall, then it wasn't hearing that brought him to you.

 

Edit 2: It's also possible that he was close enough to you to see your left shoulder. LOS checks eyes/feet/left shoulder/right shoulder.

Share this post


Link to post
Share on other sites

With the release of WS5, I now have some time to look at the visibility situation. Will start in the next few days, with the target of 2.08 for any improvements.

Share this post


Link to post
Share on other sites

@zergrush:

 

The problem in your videos has nothing to do with the visibility problem we've been discussing.

 

The func_statics shown in this image:

 

post-3633-0-91725000-1555005690_thumb.jpg

 

have no clip models, so when the AI is at the far end of the room, looking back in the player's direction, a test for visual occlusion fails, since there's no clip model to occlude the AI's LOS to the player's eyes (pink cube).

 

Result: he can see the player hiding up on the package.

 

So this is a map issue.

 

To check, I removed the no clip model designations and rebuilt the map. The AI comes all the way back to my side of the room and doesn't spot me until he has cleared the corner of the shelf I'm hiding behind.

 

Mischief managed.

Share this post


Link to post
Share on other sites

@zergrush:

 

The problem in your videos has nothing to do with the visibility problem we've been discussing.

 

The func_statics shown in this image:

 

attachicon.gifnoClipModel.jpg

 

have no clip models, so when the AI is at the far end of the room, looking back in the player's direction, a test for visual occlusion fails, since there's no clip model to occlude the AI's LOS to the player's eyes (pink cube).

 

Result: he can see the player hiding up on the package.

 

So this is a map issue.

 

To check, I removed the no clip model designations and rebuilt the map. The AI comes all the way back to my side of the room and doesn't spot me until he has cleared the corner of the shelf I'm hiding behind.

 

Mischief managed.

 

Thank you for clarifying this! I will report it to Dragofer in the respective FM thread.

Share this post


Link to post
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.

Sign in to follow this  

×
×
  • Create New...