Jump to content
The Dark Mod Forums

Some Feedback and An Attemp on Improving the AI


Fausst

Recommended Posts

Hello,

I am an undergraduate Computer Engineer student. I worked on various little game projects written in java and c++ wtih my classmates. Stealth genre is my favourite genre in gaming and as you all know thief series is the pinnacle. So I found this mod recently while searching a couple of weeks ago. After playing like 10 missions I really loved the mod. I really congragulate the team for being able to create the same old school thief sense with better graphics into the DOOM 3 engine. To keep it short, I would like to share some feedback and I am also working on the code (actually trying to construct the system in my mind) to implement some improvements. I have some questions and need some guidence about some particular subjects. I thought this would be the most appropriate subforum.

 

First the feedback

 

1- I think someone told and probably you guys fixed but there is a visually bugged candle in the training map.

2- 0002068: AI not sharing alerts with nearby allies. I would like to add that, so far I didn't see any example of this bug.

3- You can get the loots inside the closed secret safes., like a painting etc., without opening the secret safe. I experienced this multiple times in some maps.

4- The ai doesn't seem to care about opened doors or movement on doors. You can just play with a door in front of the ai and they won't react to it as I observed. There is some evidence in the code trying to improve on this but I am not sure about the effects. And there isn't any awareness in AI about the door sound. Is there?

5- The player doesn't take damage while standing on top of a torch or something that is on fire.

6- I didn't saw a single AI relighting a candle in my experience. I thought it was missing in the engine but after tracing, it was implemented in the code with a chance factor, so it was my luck I guess.

7- I think there should be more visibility penalty while you move, especially just a few feet away from an AI. Maybe it could be slightly random. (somehow :P)

8- This is the one I am working on: AI doesn't react to an object that is grabbed by the player and moved in front of their eyes. I tested it multiple times, even the object is completely lit in front of the AI nothing happens. In fact, you can push them with these objects if you do it slowly and carefully :) Related to this, they don't react to candle or lantern light that moves or appears in front of them. You take a candle and completely brighten the front of the AI while standing next to him, there is no reaction.

 

I need some guidence in number 8.

I created multiple algorithms using different methods in the code. The most simple solution was

if the ai can see the object && that object is grabbed by player && it also moves

face to the entity that is moving and set the alert state to searching.

There are methods like canSee(), faceEntity(), getBindMaster(), setAlertLevel() etc. for me to implement this.

I think the AI can handle afterwards. But I have a question.

 

I don't know where to add this improvement. Where does the AI evaluate its options on some time interval? The only method I found was "think()". I couldn't figure out how to merge this reaction into the realtime AI process.

 

By the way, for the light awareness;

if the light is held by the player && the light moves && the bounding sphere of light intersects with the AI viewcone

turn toward the lightsource

This would result in seeing the player which is a natural reaction. So I thought it would be enough.

 

I know you are a tiny team and you don't have time but I would really appreciate some guidance about this structure and my solutions. Once I fill in the gaps on structure i figured out and get the complete picture about how things work, I should be rolling on myself. If my effort seemed incompetent to get some guidance, I would understand that.

 

I really appreciate what you guys are doing and I want to contribute as far as my life allows me.

Edited by Fausst
Link to comment
Share on other sites

Some of this is already being implemented in 1.08, so once that's released things will be different.

 

I don't think we need more of a movement penalty, that's mostly based on light/sound, things player can easily judge. Moving faster makes a louder sound.

We don't need to make it any harder on the player imo. If a player is getting around a map to easily maybe the map needs more light, better patrols, etc..

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Welcome to the boards! :)

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Grayman is our resident AI expert, so he's the one ask.

 

Ok, I'll wait for him than. By the way, I read all the SDK and have a better understanding, I think I can try to implement something now.

Thanks

 

Some of this is already being implemented in 1.08, so once that's released things will be different.

 

I don't think we need more of a movement penalty, that's mostly based on light/sound, things player can easily judge. Moving faster makes a louder sound.

We don't need to make it any harder on the player imo. If a player is getting around a map to easily maybe the map needs more light, better patrols, etc..

 

So there is a chance that number 8 is already done. To clear things, I was thinking that you should be more visible than presently when you move. If the lightgem is compeletely dark, it makes sense that you should be invisible when standing still like an object in the game but I don't think it is "realistic" (in terms of gameplay) to be invisible 5 cm in front of an enemy while moving. Of course it is also the mappers responsiblity but a human eye can percept an object better, if it moves (well according to my senses :P) Anyways this is just an opinion, you guys definately know how to build the experience well.

 

Thanks all for the interest.

Edited by Fausst
Link to comment
Share on other sites

The point is though that the player is the master of shadows. Hence when in the shadow that's the players safe spot/ bonus. Sometimes the game is already slow moving enough, adding a movement penalty would just make it slower.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Yes, I agree with you on the game pace part. Still, I think adding a penalty that would cause a difference only if you move, in something like half meter away from the enemy, wouldn't hurt the pace I guess. On the other hand, it would make it more strategic because the player will not be able to act freely just in face of the enemy. For feeling the tension when you walk so close around an enemy.

Edited by Fausst
  • Like 2
Link to comment
Share on other sites

#3 - sounds like problems with individual maps

#4 - might be related to mapper choice / difficulty level. I thought I've been noticed opening doors on much older versions (not usually causing more than a minor alert though)

#6 - if you mean the moveable candles, I haven't come to expect this since I usually ditch them behind a bookcase or something, which obviously makes it unlightable. But I think they can be relighted if they are seen and reachable. Torches can and do get relighted.

Link to comment
Share on other sites

Fauust, you should definitely check with grayman, and get SVN access. It sounds like you have useful ideas and we can definitely use another coder (someone not working on AI would of course be even better, but we take what we get :)

 

Regarding the fire hurts player: This is on my wishlist and something I planned to implement for a very long time. But you can bet that this will spark a very long discussion on wether it should hurt or not, and how much and whatever, and in 6 months time it will not being done, either. I got frustrated with that process, so I pulled out of things like that.

 

For the AI: Yes, I know in one level I had an AI that was just standing. When I alerted him, he moved, and then proceeded (wrongly) to stand under a lit doorway. I played my way out of this by moving crates from the shadows (5m long grabber arms :-) and moving them into the light, creating a new shadow for me to crouch in, and move the next crate. Always felt like that shouldn't be possible, using a fully lit crate in your grabber to create a shadow to hide yourself in :)

"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

Welcome to TDM!

 

I'll try to respond to your questions.

 

[Apparently the forum editor doesn't allow more than 10 quote pairs, so I'll switch to italics.]

 

1- I think someone told and probably you guys fixed but there is a visually bugged candle in the training map.

 

You've obviously found the bugtracking system, so I would suggest filing a bug with details about that particular problem, identifying the candle in question.

 

2- 0002068: AI not sharing alerts with nearby allies. I would like to add that, so far I didn't see any example of this bug.

 

General sharing of alerts was fixed in 1.07. As you can see from my last two notes in that issue, I was trying to find out if this was still a problem in 1.07, with an eye toward marking this issue resolved/closed. But I got no response.

 

In order to make changes to the SDK, you're going to need to be able to build small maps that 1 - exhibit the problem, and 2 - show that your changes fix the problem. If you haven't made a TDM map yet, you'll need to be able to do that before diving into the code. If the problem cited is in an existing FM, then it's appropriate to test with that, but testing small maps specifically set up to expose the problem are (at least my) preferred way to go.

 

3- You can get the loots inside the closed secret safes., like a painting etc., without opening the secret safe. I experienced this multiple times in some maps.

 

There are things a mapper can do to prevent this, so it's not a coding issue, but a mapping issue.

 

4- The ai doesn't seem to care about opened doors or movement on doors. You can just play with a door in front of the ai and they won't react to it as I observed. There is some evidence in the code trying to improve on this but I am not sure about the effects. And there isn't any awareness in AI about the door sound. Is there?

 

That's true. AI aren't designed to react to many occurrences that you or I would react to in real life. But I don't think I'd like to see them reacting to opening doors or door-opening sounds they might hear. After all, they are surrounded by patrolling friends that use doors, so doors opening/closing/making noise aren't in and of themselves interesting/alarming events.

 

If the mapper wishes passing AI to recognize that a door is open that shouldn't be, they can mark the door. Passing AI will note that the door is open when it shouldn't be, investigate, and shut the door when they're done.

 

5- The player doesn't take damage while standing on top of a torch or something that is on fire.

 

True. This is worthy of a bugtracking issue and repair.

 

6- I didn't saw a single AI relighting a candle in my experience. I thought it was missing in the engine but after tracing, it was implemented in the code with a chance factor, so it was my luck I guess.

 

Not all doused candles will be relit. Lights can be marked with different states that control how an AI will react to them being out. Most doused lights will only elicit a passing comment from an AI. It's possible, especially with older FMs, that you weren't encountering lights that AI were going to bother relighting. And, as you noticed, some randomness is applied so an AI doesn't spend all its time wandering around relighting lights the player put out. Not fair to the player, and rather unrealistic.

 

7- I think there should be more visibility penalty while you move, especially just a few feet away from an AI. Maybe it could be slightly random.

 

There are visibility changes already in 1.08, with more coming. None address movement, and the topic is probably worthy of its own thread. Be prepared for a long discussion, though.

 

8- This is the one I am working on: AI doesn't react to an object that is grabbed by the player and moved in front of their eyes. I tested it multiple times, even the object is completely lit in front of the AI nothing happens. In fact, you can push them with these objects if you do it slowly and carefully. Related to this, they don't react to candle or lantern light that moves or appears in front of them. You take a candle and completely brighten the front of the AI while standing next to him, there is no reaction.

 

True. This behavior falls again into the category of "just how much of the real world should we implement?". It's in the same bucket as "AI should see the player when he's backlit, even if he's in deep shadow", or "I just saw a light come on and nobody's supposed to be in there", and probably a million other things. 99.99999% of these things aren't going to be implemented, and we have to depend on the player's ability to "suspend disbelief" as he plays.

 

If the player is carrying a candle around, and especially if he pushes it into an enemy AI's face, he's going to be noticed, regardless of whether you expect the AI to notice the candle itself. But pushing an AI around with a grabbed object is a problem, and in the code changes I'm working on at the moment, the AI will no longer take it lightly.

 

I don't know where to add this improvement. Where does the AI evaluate its options on some time interval? The only method I found was "think()". I couldn't figure out how to merge this reaction into the realtime AI process.

 

Oy! You can send me a PM and we'll take the discussion offline.

 

By the way, for the light awareness;

if the light is held by the player && the light moves && the bounding sphere of light intersects with the AI viewcone

turn toward the lightsource

This would result in seeing the player which is a natural reaction. So I thought it would be enough.

 

The team would need to discuss whether this is desirable from a gameplay perspective. Should it be extended to cover the case where the candlelight from a passing candle behind an AI that's visible in front of him that wasn't there a moment earlier cause him to turn around? One of his friends could be carrying it, so he shouldn't show any interest. We have maps with AI patrolling with torches. The movement of those lights shouldn't cause any AI to react in any way. And I see no difference between candlelight movement and torchlight movement. It's only when candlelight or torchlight lights an enemy that it should become interesting to an AI.

 

So, again, this needs a good discussion to vet the problems or disconnects that could occur if implemented.

 

I know you are a tiny team and you don't have time but I would really appreciate some guidance about this structure and my solutions. Once I fill in the gaps on structure i figured out and get the complete picture about how things work, I should be rolling on myself. If my effort seemed incompetent to get some guidance, I would understand that.

 

Very tiny. We welcome all help offered. I would suggest you proceed this way:

 

1 - start a thread describing a problem you found (or one from the bugtracker) and what you'd like to do about it

2 - when the thread has wound down, if the response is favorable, then carry on. If not favorable, pick something else

3 - PM anyone on the dev team to get some help with how to implement, or where things are. None of us knows all of it (except for greebo, but he's leaving), and any of us could redirect you to someone else if we're in over our head

 

Again, welcome to the project!

Link to comment
Share on other sites

Very nice... I for one fully endorse the subject you are trying to study and change (AI perception of moving objects and lit ones), as I always felt it was a huge gap you must force yourself never to perform in order to not loose immersion. If you guys can, like Grayman said, sit down and find a simple solution that cover all repercussions, that would be amazing!

Link to comment
Share on other sites

None of us knows all of it (except for greebo, but he's leaving)

So it is greebo? Well... :(

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

Fauust, you should definitely check with grayman, and get SVN access. It sounds like you have useful ideas and we can definitely use another coder (someone not working on AI would of course be even better, but we take what we get :)

 

Thank you all for the warm welcome :)

I contacted with grayman as suggested. By the way, just curious, what are the other particular areas that you need a coder?

Link to comment
Share on other sites

In regard to movement penalty, there is already one in place. If the player moves, they are already more visible as a movement modifier brightens the gem slightly more. This is the same as in Thief. There are issues in low light situations however that make the player almost invisible, even when moving. I'm looking into correcting that so that the AI are no longer completely blind in the average light levels used most by mappers.

Link to comment
Share on other sites

In regard to movement penalty, there is already one in place. If the player moves, they are already more visible as a movement modifier brightens the gem slightly more. This is the same as in Thief. There are issues in low light situations however that make the player almost invisible, even when moving. I'm looking into correcting that so that the AI are no longer completely blind in the average light levels used most by mappers.

 

Yes, i figured that there is a penalty but as you said you can become so invisible that it will not effect your gem anymore. If you can correct the average light levels that would be another solution for this. Anyway I will start seperate threads for the 4 and 8 know. Maybe 6 and 7 later as grayman suggested. By the way which is the most appropriate subforum for discussing the changes for 4 and 8?

 

SiyahParsomen yabancı değildir bence...

Edited by Fausst
Link to comment
Share on other sites

Hoşbulduk. Ben de şaşırdım baya seni görünce :) English konuşun dicekler şimdi. Anyways if youre around for a while you can answer my question above? "By the way which is the most appropriate subforum for discussing the changes for 4 and 8?"

Link to comment
Share on other sites

Yes, i figured that there is a penalty but as you said you can become so invisible that it will not effect your gem anymore

 

That's always been something that bugged me too. I thought moving should just raise the lightgem level a hard-coded amount, like equipping the sword does.

Link to comment
Share on other sites

I thought it was a percentage-based system based on how much light you're in? So you reach a point where you're dark enough that the modifier has no real effect.

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

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...