Jump to content
The Dark Mod Forums

AI reacting to sound


kaldor

Recommended Posts

Hi!

 

I wondered if - in a later DM version - the AI would not generally be alerted by sounds of the player, if also NPC are in the area.

 

For example, in one of the maps, there is a "cook"-NPC running around in a kitchen. In the hallway (behind a closed door) stands a guard. When the player knocks out the cook and starts running around in the kitchen, making noises, the guard will be alerted. But how could he know, that there is a stranger and not the cook doing his job?

 

Do you think this is a problem, or should remain unresolved for reasons of gameplay (and complexity) ?

 

 

The other way round: It could add to realism and difficulty if the guards would react to some NPC actions. Maybe there are REALLY rats and the guard takes a look. Or a NPC drops something and the guard would leave his normal track to check out. On "easy" setting, that would be inappropiate. But on "normal" or "hard", that randomness would add to the experience, imo.

I guess these events need to be scripted (still on a random base), so they appear when the player is around and are not executed too often.

 

greetz,

kaldor

Link to comment
Share on other sites

I don't think what you're asking would really be possible, or feasible for the gameplay. The AI 'have' to react to the player, that's the whole point of the game. :) I understand what you're saying from a 'reality' standpoint, but in a lot of cases reality has to take a back seat to better gameplay.

Link to comment
Share on other sites

Do you think this is a problem, or should remain unresolved for reasons of gameplay (and complexity) ?

 

Yes, yes, and yes. :)

 

You're right, realistically it shouldn't happen. But trying to figure out some kind of general, codable rule for WHEN it shouldn't happen would be nightmarish.

Link to comment
Share on other sites

Yes, yes, and yes. :)

 

You're right, realistically it shouldn't happen. But trying to figure out some kind of general, codable rule for WHEN it shouldn't happen would be nightmarish.

 

This is how I think it should work: I am thinking of an AI path saturation principal. I don't know if it would be easy to code but it would sort of work like this:

Along the AI path you have allowable "sound bubbles" that is to say if you travel roughly along the path people wont suspect a thing, around the NPC is another sound bubble and if you're in the intersection of the two bubbles your cover is blown for that path; however if there is another path your cover isn't blown. You would however have to keep pretty close to the path and walk at the same rate, i.e running should alert people. In the case of the servant in the kitchen the saturation would be the whole room (because his path is all around the room) thus when you knock him out and begin walking you are covered.

 

Ideally though there should be a sight checking system so that if you make noise people look there and if they don't see a guard they become suspicious. So it only should work well if people can't visually see the path.

Edited by DingDong
Link to comment
Share on other sites

This is how I think it should work: I am thinking of an AI path saturation principal. I don't know if it would be easy to code but it would sort of work like this:

Along the AI path you have allowable "sound bubbles" that is to say if you travel roughly along the path people wont suspect a thing, around the NPC is another sound bubble and if you're in the intersection of the two bubbles your cover is blown for that path; however if there is another path your cover isn't blown. You would however have to keep pretty close to the path and walk at the same rate, i.e running should alert people. In the case of the servant in the kitchen the saturation would be the whole room (because his path is all around the room) thus when you knock him out and begin walking you are covered.

 

Sounds like it would be hell to code, and then more hell for mappers to setup. Mappers would have to manually define these areas. To the computer, a room is just a room, so the mapper would have to flag areas as safe....but of course then there is coding all the potential scenarios that this new system would have to account for.

 

Interesting suggestion, but it would alter gameplay drastically and it's beyond the scope of what we want for the toolset.

 

Masking the player with some loud noise is doable, but for reliable gameplay...what you hear is what you get.

Link to comment
Share on other sites

Sounds like it would be hell to code, and then more hell for mappers to setup. Mappers would have to manually define these areas. To the computer, a room is just a room, so the mapper would have to flag areas as safe....but of course then there is coding all the potential scenarios that this new system would have to account for.

 

Interesting suggestion, but it would alter gameplay drastically and it's beyond the scope of what we want for the toolset.

 

Masking the player with some loud noise is doable, but for reliable gameplay...what you hear is what you get.

 

I figured it would be too much for a mod team to do and to be honest I didn't expect the suggestion to be taken seriously, it's just how I think it should be done if it were to be done. Perhaps the people making Thief 4 should do that, would definitely be something that's never been done before. I think though that it wouldn't bug out too much as long as the logic is correct - NPC's would draw a line of sight to your location, if you make sound and you're in their line of sight they're suspicious, if not then no they aren't. If a person who patrols that path hears you (and knows that no one should be there) then they become suspicious regardless unless there is another path that would explain to them why they hear footsteps, but they again trace line of sight so if you're in a shadow thats in their sight your cover isn't effective. In theory the algorithm doesn't seem all that complicated at all.

 

Also my idea is that it should be done with AI patrol paths - that some area is drawn around the path within which you may walk, around each NPC is a circle within which the path is "cancelled out" (People who walk their own path know what to expect). So it only works with NPC's other than the AI's path that you're using as cover.

 

sounds like too much of a restriction on the gameplay that allows you to do what you want and when you want and not be restricted by triggered events as thats what am reading these bubbles as.[/Quote]

Not really, you can't run around and jump, you have to know the guard's path to know when you're safe and the original guard would have to not hear you. I think essentially only attentive thieves would be able to utilize such a feature.Those who don't pay attention that much probably wont notice that much of a difference.

Edited by DingDong
Link to comment
Share on other sites

I figured it would be too much for a mod team to do and to be honest I didn't expect the suggestion to be taken seriously, it's just how I think it should be done if it were to be done. Perhaps the people making Thief 4 should do that, would definitely be something that's never been done before. I think though that it wouldn't bug out too much as long as the logic is correct - NPC's would draw a line of sight to your location, if you make sound and you're in their line of sight they're suspicious, if not then no they aren't. If a person who patrols that path hears you (and knows that no one should be there) then they become suspicious regardless unless there is another path that would explain to them why they hear footsteps, but they again trace line of sight so if you're in a shadow thats in their sight your cover isn't effective. In theory the algorithm doesn't seem all that complicated at all.

 

It would be fine if it only involved AI and no player interaction, but for the player the core of the gameplay is...don't be heard, don't be seen. This introduces a rather unreliable element for the player. When and where will I be seen? How does the game communicate to the player that this room is safe and this one isn't? It drastically upsets the elegance of the gameplay, and like it or not, thief is a game.

Link to comment
Share on other sites

It would be fine if it only involved AI and no player interaction, but for the player the core of the gameplay is...don't be heard, don't be seen. This introduces a rather unreliable element for the player. When and where will I be seen? How does the game communicate to the player that this room is safe and this one isn't? It drastically upsets the elegance of the gameplay, and like it or not, thief is a game.

 

I think that you'd have to make players aware of this feature in a tutorial then. For them to use this feature they must first observe the AI's path and then they must utilize it when the said AI isn't within hearing range. It would promote slower gameplay I think.

 

I think the main issue is probably that it wont have that much of an effect on game play, people who ghost wont ever know about it unless the map forces you to use it. Might be too gimmicky even though it would be realistic.

 

I think that in the end it would probably be too much work for the minimal reward even thought it would be insanely cool to see. I understand also what you mean about elegance in that it would be difficult to utilize effectively (Whereas everything else is straightforward) because you have to remember quite a bit of data and it would only come in handy in situations like described in the first post, but how many situations like that are there? Then again such a feature would have been insanely useful in some Thief 1/2 missions.

Edited by DingDong
Link to comment
Share on other sites

I've been exploring and working with the AI code for a few months now, and some of this might be possible. The one thing definitely do-able is masking your footsteps with machine noise. That's just common-sense thinking. But there are many, many roadblocks alongside this feature if I follow your original examples.

 

1) It'll be a convoluted mess of spaghetti code. Lots of conditionals to try to keep organized. Lots of variables to have to keep in mind while writing the code. (Absolute nightmare to code)

2) There would be a lot of variables to keep in memory and a lot of actions to run. This feature would be going at runtime, and will hog the CPU a lot since it has to run every 1/60th of a second. Some of the code would have to parse the whole map. As soon as you get to T1/2 size missions, there's a lot of info to sort through in less than a blink of an eye. (Possible nightmare for performance)

3) There's some AI code and events (off the top of my head) that would have to be tweaked ( :rolleyes: everyone's favorite job) or perhaps even written from scratch. (Too much work to yield so little reward)

 

And NH put it pretty well above. It's a neat feature, but who would know when it's applicable? Much of it will end up feeling more like a giant AI bug rather than a feature.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

Much of it will end up feeling more like a giant AI bug rather than a feature.

Indeed. Complex, opaque systems often look stupid, no matter how smart they actually are. And this would definitely be a complex and opaque system.

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I dont like the idea of restricting the player to a certain path, like its has been said the player sticks to a path where the guard cant hear them and if they wander from the path and wander through a sound bubble it would trigger the guard to react. Wouldn't that restrict the open game play that thief is based arround, it be like playing thief via half-life 2 style where you're restricted to a certain linear path.

 

I suppose you could fake it by putting a source on the player and a reception on the guard, and when the radiation from the players source gets too much for the guard, it kills you, still sounds like a triggered event, how would you knockout the guard, it would be near impossible.

Link to comment
Share on other sites

This idea might be retarted as I am quite tired and my brain is running on emergency power, but let's assume for a moment that if what I hear is (significantly) louder than the noise I make, people in my vicinity will less likely/not hear me. This is simplified, of course, as a guard standing next to an insanely noisy generator wouldn't hear anything besides it. I don't know anything about how the engine works let alone modding it, so I can only assume that this is easier to implement and less time consuming to compute than DingDong's suggestion. Plus, it would add a new gameplay mechanic that entire fms could be based on like metal bridges + thunderstorms and it is a lesson easily taught. Skilled players might even learn to follow guards in lockstep, should G...arry eventually learn to walk like a sane person.

Link to comment
Share on other sites

Skilled players might even learn to follow guards in lockstep, should G...arry eventually learn to walk like a sane person.

:D (I don't think our thief even has a codename, unless you really want to call him '$player1')

 

Huh, I had never thought of synchronized footsteps. But, to answer your question: yes, that is possible to code. Shielding your footsteps with noisy machinery would just be common sense to the player. Performance-wise, it would probably be two measly math checks that won't affect framerate.

yay seuss crease touss dome in ouss nose tair

Link to comment
Share on other sites

I'd say it'd be a fair bit more than two measly maths checks (for starters, you need to first figure out what sounds are currently playing nearby, which is not trivial as such), but certainly I'd say it's possible.

 

I quite like the idea of calling him "G...something", where the "something" changes every time. :D And yes, G...abriel doesn't have a single official name. In fact I think the idea is we have several master thief characters, simply because different people prefer different names and will build different personalities around them. e.g. Fidcal is using Farrell. Hopefully as mappers develop the TDM universe we'll start seeing more different characters, each with their own particular style (in briefings and in the type of missions they do and such).

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

I quite like the idea of calling him "G...something", where the "something" changes every time. :D And yes, G...abriel doesn't have a single official name. In fact I think the idea is we have several master thief characters, simply because different people prefer different names and will build different personalities around them. e.g. Fidcal is using Farrell. Hopefully as mappers develop the TDM universe we'll start seeing more different characters, each with their own particular style (in briefings and in the type of missions they do and such).

 

Reminds me of the subgenre of detective stories. More have been written than anybody could possibly ever read in their lifetime and although all the protagonists share the same profession, there are thousands of unique characters, ranging from Poe's Dupin to Chandler's Marlowe. It is a heartwarming thought that some day in the future an even number of unique fictitious thieves may exist (and once the critical mass has been reached they'll duke it out in a steampunky version of San Francisco). Should I ever manage to actually finish a fm, I think I'll call my thief G...ibson, Gibson Les Paul ;)

Edited by lostbuthappy
Link to comment
Share on other sites

(and once the critical mass has been reached they'll duke it out in a steampunky version of San Francisco).

:wub:

 

Coincidence? :)

You might say that. I couldn't possibly comment. :)

My games | Public Service Announcement: TDM is not set in the Thief universe. The city in which it takes place is not the City from Thief. The player character is not called Garrett. Any person who contradicts these facts will be subjected to disapproving stares.
Link to comment
Share on other sites

...and when he brings his guitar, how do you expect the guards to react? I see some potential here. :P

 

Discussing names, there's an othographic similarity I just noticed:

 

Garrett

Farrell

 

Coincidence? :)

 

No, his real name is actually ʇʇǝɹɹɐƃ.

"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 actually find interesting the idea of `safe zones.' There was something similar in the original Thief: the mission Undercover. If you stayed in the main floor everyone would ignore you as they were thinking you were an acolyte. But if anyone see outside the safe zone or doing something inappropriate your cover is blown and the usual gameplay restart.

Link to comment
Share on other sites

Yes. It's up to the mapper to set teams and team relationships. I almost made the city watch in Thief's Den start as neutral so he ignored the player until the player climbed the wall. At which point I considered a stim to trigger a change of team for the city watch. But in that situation it might have confused the player so I left it out.

 

For something like Bafford you would have a stim in the yard so if the player went in there it would trigger the guards to shout 'begone rogue' or similar. If you went back then it changes their team from neutral to enemy. What we don't have at the moment I don't think is a response to a raised weapon which would be useful. In Thief 2 there was an actual metaproperty called frontgateguard which meant the AI acted neutral until he saw a raised weapon (or the metaprop was removed by a trigger of some sort eg, going into an area.)

Link to comment
Share on other sites

For something like Bafford you would have a stim in the yard so if the player went in there it would trigger the guards to shout 'begone rogue' or similar. If you went back then it changes their team from neutral to enemy. What we don't have at the moment I don't think is a response to a raised weapon which would be useful. In Thief 2 there was an actual metaproperty called frontgateguard which meant the AI acted neutral until he saw a raised weapon (or the metaprop was removed by a trigger of some sort eg, going into an area.)

 

So if I understand you correctly there is currently no "elegant" way to make a guard neutral until it witnesses "a crime" or is alerted by other guards?

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 )
      · 1 reply
    • 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
       
      · 3 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
×
×
  • Create New...