Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Gloomwood - Thief-ish stealth horror game from New Blood Interactive - Early Access on September 6th

toughasnails

Learned
Joined
Sep 20, 2021
Messages
459
Locking a door on enemies does exactly what it should: it buys you time. What were y'all expecting? "Oh the door is locked, I will quietly return to my patrol and forget this incident"?
The problem is that the AI in a stealth game has to behave in certain predictable and yes dumb way for certain mechanics to work. Like when you use noise to distract enemies, you throw some item if the game allows you or use the noise arrow in Thief. if you encountered that irl you'd be looking for the direction that came from, you wouldn't tarry around in the small area from which the sound emanated. But in a stealth game the AI has to behave in the latter way in order for distraction mechanics like that to work.
 

Child of Malkav

Liturgist
Joined
Feb 11, 2018
Messages
1,511
Location
Romania
It's definitely been done in other games too. Off the top of my head Swat 4 has door stops that you can equip and use to keep doors shut.
That was the wedge. Not a key or lockpick but it kinda fulfilled the same purpose for blocking or allowing access through some doors.
 

Child of Malkav

Liturgist
Joined
Feb 11, 2018
Messages
1,511
Location
Romania
The problem is that the AI in a stealth game has to behave in certain predictable and yes dumb way for certain mechanics to work.
Everyone keeps saying stuff like this yet I haven' seen any stealth game where the AI is actually smart to test these mechanics and various diversions and watch the AI react correctly. And it's not just 0 or 1, black or white, the AI behavior (like in real life behavior) has degrees and nuances to it. In your example that you provided if the distraction was part of the ambient or scenery that the AI is currently in it shouldn't cause it to investigate for long or put much effort into it. But if the distraction was caused by a noise making device or gadget of some sort, then yeah, getting alerted an investigating around much more thoroughly maybe even calling some allies for backup just in case would be believable.
Anyway, all this is just an excuse to keep the Ai at the current level and not improve on it, because it is difficult to program. Even the "amazing" AI in Alien Isolation fucking cheats so that says a lot about the state of AI development in videogames.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,764
Insert Title Here RPG Wokedex [Steve gets a Kidney but I don't even get a tag.]
Everyone keeps saying stuff like this yet I haven' seen any stealth game where the AI is actually smart to test these mechanics and various diversions and watch the AI react correctly. [...] But if the distraction was caused by a noise making device or gadget of some sort, then yeah, getting alerted an investigating around much more thoroughly maybe even calling some allies for backup just in case would be believable.

It isn't that hard to make AI that can notice the little gadget or arrow or whatever (all it needs is a visibility system and pretty much any AI system that can notice the player has this already) that is making noise and then set it in a "high alert" state and even call other nearby AIs for help.

The problem is, ok, now the AI is there looking around, potentially in an unpredictable manner, instead of standing still or making fixed patrols that can be learned, followed and/or avoided and they won't go back to a "neutral" state because it doesn't make sense at all, especially if they are supposed to be guards and their job is to ensure they remain vigilant - what do you do as a player who in these types of games you usually have no way of defending yourself or when you do it is a last choice? When it comes to that you either reload, because there is no point of trying to work around this (you already failed to remain silent in the first place) or get caught, at which point you just reload again since you're dead.

So basically the AI *has* to "forget" about you or abandon you, in one way or another, otherwise it might just as well have a game over screen the moment you get noticed - and lose a bunch of other mechanics in the process. Does it make sense? Not really, but it makes for more interesting gameplay and in games (IMO, at least) gameplay > realism.
 

Child of Malkav

Liturgist
Joined
Feb 11, 2018
Messages
1,511
Location
Romania
what do you do as a player who in these types of games you usually have no way of defending yourself or when you do it is a last choice?
You continue playing. Assuming the game has very good level design (Thief, Deus Ex, Dishonored, Hitman WoA trilogy etc.), tools that can be used in various ways for combat and stealth (Flashbombs, mines lethal and non lethal, tranq darts, gas arrows or whatever magic powers etc.) as well as a high degree of mobility (Thief, Dishonored, Dying Light etc.) you could finish the mission with a lower score if that is the case. Thief didn't give you a mission over every time you were spotted (with some exceptions), it gave tools to deal with it, it had great level design to utilize to your advantage and great mobility being able to mantle on almost anything, jump, use rope arrows etc.
There are alternatives and solutions to rising problems and it is the job of the designer to figure this stuff out. But no one does, because muh programming. And I agree, it is hard but still, after all this time, not even one developer attempts this?
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,764
Insert Title Here RPG Wokedex [Steve gets a Kidney but I don't even get a tag.]
You continue playing.

But you *can't* continue playing, that is my point: the hypothetical AI - that isn't behaving like how AI tends to behave in this type of games - that i refer to wont give up because that wont make sense. They wont stop looking for a potential infiltrator, they won't try to take them by themselves if they have the option, they can start fleeing if they get wounded, they can use health items if they have them available, they can use ranged weapons if they have them instead of sticking with melee (and also using magic if the setting allows for it), they can throw items to the player if they are around them and can do harm or even just make sound to make others suspicious, they can keep shouting for help, etc.

None of that stuff are that hard to implement, all of the things i've mentioned have actually been implemented by games, just not all at once - and the reason isn't because developers can't implement them, but because they're just not that fun to play against because they drive you in a corner where you can't play stealthy anymore. Most of the tools wont help you if one AI can alert the entire map to your presence and send everything to chaos - and the most realistic response would be exactly that. The only tools that might help, assuming they'd make sense in the setting the game is set at (which in turn limits the types of settings you can have), are tools like making you invisible - essentially neutralizing the AI's perception but also pretty much all of the other tools or abilities your character may have (why bother with anything else if you can simply become invisible?).

Assuming the game has very good level design (Thief, Deus Ex, Dishonored, Hitman WoA trilogy etc.),

But these games (or at least Thief, Deus Ex and Dishonored due, i haven't played Hitman and i'm not sure what WoA stands for) have AI with predictable behavior that does act in ways that are unrealistic in how people would actually behave (the most realistic behavior aren't of enemies actually but of non-combatants like the servants in Thief that run and ask for help), which is what i was referring to. And TBH IMO combat is kind of a cop out if your game is meant to be about stealth (note that i'm not claiming that combat is bad, but that if you are making a stealth game then focus on stealth, not using combat as a workaround for your AI making the game less fun for stealth gameplay).
 

Child of Malkav

Liturgist
Joined
Feb 11, 2018
Messages
1,511
Location
Romania
But you *can't* continue playing, that is my point: the hypothetical AI - that isn't behaving like how AI tends to behave in this type of games - that i refer to wont give up because that wont make sense. They wont stop looking for a potential infiltrator, they won't try to take them by themselves if they have the option, they can start fleeing if they get wounded, they can use health items if they have them available, they can use ranged weapons if they have them instead of sticking with melee (and also using magic if the setting allows for it), they can throw items to the player if they are around them and can do harm or even just make sound to make others suspicious, they can keep shouting for help, etc.

None of that stuff are that hard to implement, all of the things i've mentioned have actually been implemented by games, just not all at once - and the reason isn't because developers can't implement them, but because they're just not that fun to play against because they drive you in a corner where you can't play stealthy anymore. Most of the tools wont help you if one AI can alert the entire map to your presence and send everything to chaos - and the most realistic response would be exactly that. The only tools that might help, assuming they'd make sense in the setting the game is set at (which in turn limits the types of settings you can have), are tools like making you invisible - essentially neutralizing the AI's perception but also pretty much all of the other tools or abilities your character may have (why bother with anything else if you can simply become invisible?).
You take the most extreme examples in which detection equals death or reload. An intricate, sprawling level allows you to retreat and re enter stealth except this time around the whole mission will be harder as you're being punished in the way of permanently alerted enemies, different patrol routes, fortified tactical positions, newly activated security systems etc. Still not a game over, not a death sentence. But these things have to be thought out, well weighed and designed. Switching to combat is not necessary and should not be possible. You can resort to using disguises, manipulating the environment, creating or discovering new paths to various places or objectives.....depends on the game. In Watch Dogs you can interact with the environment in interesting ways using hacking, for example. In Prey you have access to all sort of tools that can be used creatively, the same way for Dark Messiah. It really depends on the game and the possibilities it offers.
If the designer doesn't give you options then yeah, the consequences of detection will be hellish from an advanced AI.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,764
Insert Title Here RPG Wokedex [Steve gets a Kidney but I don't even get a tag.]
You take the most extreme examples in which detection equals death or reload.

I'm taking the position from the perspective of making an AI that doesn't act in the predetermined dumb ways that AI reacts like in games, especially in stealth games.

An intricate, sprawling level allows you to retreat and re enter stealth

How are you going to "enter stealth" if the AI already knows you are here unless it forgets about you? What are you going to do if the AI decides that whatever trinket you are trying to steal is worth keeping an eye on (which is extremely trivial to implement) and you can't fight them?

except this time around the whole mission will be harder as you're being punished in the way of permanently alerted enemies, different patrol routes

Different patrol routes would be what a smart AI would do, when people become alerted they aren't changing their window A to B route to window C to D. They're actively trying to find what is going on and become unpredictable.

fortified tactical positions

Which, without combat, how are you going to defend against, especially against an AI that doesn't wait its turn?

Still not a game over, not a death sentence.

Just because it isn't technically a game over or death sentence it doesn't mean in practice it makes sense to try and keep going. It'd be like being encircled by enemies you can't touch and can't kill, at which point might as well reload.

You can resort to using disguises, manipulating the environment, creating or discovering new paths to various places

And see? You are still thinking in terms of the current dumb AI, an AI that behaves realistically wouldn't be fooled by a disguise in an alerted state - FFS i couldn't convince some random clerk that my id was real when i visited another country, there is no way someone who is actually in an alerted state and is looking for intruders will be fooled by a disguise.

And for new paths? Sure, but paths to where, when...

or objectives

...your objective, as mentioned above, would be guarded since that is what an AI whose goal is to guard would do.

.....depends on the game. In Watch Dogs you can interact with the environment in interesting ways using hacking, for example. In Prey you have access to all sort of tools that can be used creatively, the same way for Dark Messiah. It really depends on the game and the possibilities it offers.

All of those have quite dumb AIs that were meant to "play along" the systems.

TBH i think the issue is this:

But these things have to be thought out, well weighed and designed. Switching to combat is not necessary and should not be possible. [...]
If the designer doesn't give you options then yeah, the consequences of detection will be hellish from an advanced AI.

...you are assuming that all it takes for games to be as you imagine them is to just have designers "think harder", except it isn't a matter of just "thinking harder" - some things are just intrinsically not fun.

I mean consider that even in Doom 3, where monsters could simply navigate around the world and reach the player from behind (thanks to an advanced navigation system that the game had inherited from Quake 3), many people complained that the game was cheating and spawning monsters behind them (the game does that too but when it does that it plays a sound so you know it is a spawn).

So while it sounds like an obvious solution, in practice you can't just max out intelligence, you need to find a balance between AI looking (though not necessarily being realistic) smart enough and the player being able to use the systems they have at hand, otherwise not only you are making the game pointlessly hard (which is different from just being hard because you need to find the proper solution) but also make the game's systems useless. The AI and the rest of a game's design must work in tandem, you can't have one negate the other (e.g. having a realistic AI ignore disguises - because that is what would happen in reality - would make a disguise system useless).[/QUOTE][/QUOTE]
 

Child of Malkav

Liturgist
Joined
Feb 11, 2018
Messages
1,511
Location
Romania
How are you going to "enter stealth" if the AI already knows you are here unless it forgets about you?
As long as it doesn't know where you are just that you are in the general are then you still have the element of surprise.
What are you going to do if the AI decides that whatever trinket you are trying to steal is worth keeping an eye on (which is extremely trivial to implement) and you can't fight them?
Use various tools against them. Again, it depends on the game and your possibilities. You can drop a smoke grenade on the thing to mask your presence, take the thingy and leave. One example.
Different patrol routes would be what a smart AI would do, when people become alerted they aren't changing their window A to B route to window C to D. They're actively trying to find what is going on and become unpredictable.
A combination of the two then. Once they're alerted they randomize their actions. patrol alone or if they run into another guard and may choose to join them to go in a pair until a point after that they split. Or some may be static for a while and other s may begin patrolling. IDK, any variation of this.
there is no way someone who is actually in an alerted state and is looking for intruders will be fooled by a disguise.
If the disguise includes a part that covers the face it could work. Bonus points if you can also act like those guards and have the same equipment on you as not to suspect anything.
Which, without combat, how are you going to defend against, especially against an AI that doesn't wait its turn?
Flashbangs and maneuver past them. Gas grenades, rope arrows if the game allows it, or an equivalent of it to go above and past them, again whatever you have in the game. Example: in Styx you can create a clone that you can control from a distance for coordinated actions and distractions.
meant to "play along" the systems
What do you mean by this?

The AI and the rest of a game's design must work in tandem, you can't have one negate the other
That's not the intention. That's why I said that everything needs to be weighed correctly and the right balance between the various elements is very difficult to achieve.

Regardless, all this is just theory crafting, what ifs and discussing hypotheticals. Unless a game comes out that does all or any of this we can discuss on point about that.
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,764
Insert Title Here RPG Wokedex [Steve gets a Kidney but I don't even get a tag.]
As long as it doesn't know where you are just that you are in the general are then you still have the element of surprise.

I do not think there will be much of a surprise. They are in alert mode, unless there is only a single AI in the vicinity despite any attempts to call for support and you manage to avoid being spotted, then perhaps you can get away with it - assuming you do not have any other objective to accomplish (because otherwise the AI could just go for the objective - it'd be the most logical course of action if they have no support to go somewhere that they suspect you'd want to go instead of looking randomly).

You can drop a smoke grenade on the thing to mask your presence, take the thingy and leave. One example.

The smoke grenade will give away you are there, you are thinking in game terms - an AI could move away from a smoke screen and towards openings / doors and wait for the smoke to dissipate instead of trying to engage with you. And if they have any range weapons (arrows, pistols) they can start shooting randomly towards the smoke (remember this is about games where you are not some Rambo lookalike but are weak and rely on stealth instead of taking direct action, so something like this can be fatal).

A combination of the two then. Once they're alerted they randomize their actions. patrol alone or if they run into another guard and may choose to join them to go in a pair until a point after that they split. Or some may be static for a while and other s may begin patrolling. IDK, any variation of this.

Well, the point is that a smart AI wouldn't try combinations, it'd try to do what is the best to capture the player.

If the disguise includes a part that covers the face it could work. Bonus points if you can also act like those guards and have the same equipment on you as not to suspect anything.

This is again game thinking, someone whose entire job is to guard a place wont ignore someone they don't know about. These are accommodations games make towards gameplay instead of realism.

Flashbangs and maneuver past them. Gas grenades, rope arrows if the game allows it, or an equivalent of it to go above and past them, again whatever you have in the game. Example: in Styx you can create a clone that you can control from a distance for coordinated actions and distractions.

Same as before with the smoke grenade - the flashbang can blind some but if there is anyone not looking at the flashbang's direction you also become a target. Even if all get blinded for a bit they can start randomly trying shout to avoid their mates and try to grab you.

What do you mean by this?

That the AI accommodates what people are able to do in a game instead of trying to outsmart them, so, e.g. if in a game you can blackjack someone from behind to render them unconscious, they'll be often standing still so you can do that, if you can grab their arrows in mid-air with your arrow grab skill, they wont stop using their bow and switch to something else, they'll keep shooting arrows so you can grab them, etc.

That's not the intention. That's why I said that everything needs to be weighed correctly and the right balance between the various elements is very difficult to achieve.

Well, my original comment was about AI that is actually really smart and why while that sounds good, it isn't really fun if you try and think about how it'd work. While there might be some exceptions (since there always are), the overwhelming majority of people prefer the fantasy of outsmarting groups of NPCs than facing AI that reacts in a realistic way. But at least tech-wise the features for improving AI behavior has been around for many years.
 
Joined
Feb 7, 2019
Messages
47
You can drop a smoke grenade on the thing to mask your presence, take the thingy and leave. One example.

The smoke grenade will give away you are there, you are thinking in game terms - an AI could move away from a smoke screen and towards openings / doors and wait for the smoke to dissipate instead of trying to engage with you. And if they have any range weapons (arrows, pistols) they can start shooting randomly towards the smoke (remember this is about games where you are not some Rambo lookalike but are weak and rely on stealth instead of taking direct action, so something like this can be fatal).
To be fair most guards won't be that smart. You are in turn expecting inhumanly rational behavior from all time from all guards. In your game no guard can get scared by smoke bombs and fumble around, no guard would make a slip while stressed, and all guards have a PHD and good training. What about the newly recruited criminal scum turned guard? Would he always go to the exit and be a sentry instead of trying to angrily charge the PC in the smoke?
 

kangaxx

Savant
Joined
Jan 26, 2020
Messages
870
Location
The Silver Shark
I suppose then you're into the territory of differing difficulty levels per guard, which makes it hard to tailor difficulty levels and is probably a pain in the arse to balance properly.
 

Zombra

An iron rock in the river of blood and evil
Patron
Joined
Jan 12, 2004
Messages
10,295
Location
Black Goat Woods !@#*%&^
Make the Codex Great Again! RPG Wokedex Strap Yourselves In Codex Year of the Donut I helped put crap in Monomyth
I suppose then you're into the territory of differing difficulty levels per guard, which makes it hard to tailor difficulty levels and is probably a pain in the arse to balance properly.
The Thief series did multiple AI types and difficulty settings just fine, as did the Hitman games.
 

kangaxx

Savant
Joined
Jan 26, 2020
Messages
870
Location
The Silver Shark
Weren't different AI behaviours in Thief usually demarked by different enemy appearances (I.e. they're just different enemies)? It's a long time since I played that game.
 

Curratum

Arcane
Joined
May 14, 2018
Messages
3,930
I suppose then you're into the territory of differing difficulty levels per guard, which makes it hard to tailor difficulty levels and is probably a pain in the arse to balance properly.
The Thief series did multiple AI types and difficulty settings just fine, as did the Hitman games.

Insert any quote from the "I'm a solo indie dev package, have mercy, I can only do so much!" starter pack here.

I mean, sure, you can spend fucking months working on fireplaces that burn out in real time and a pointless "immersive" REvil inventory case, but you're too "solo dev" to make some better AI...
 

Bad Sector

Arcane
Patron
Joined
Mar 25, 2012
Messages
1,764
Insert Title Here RPG Wokedex [Steve gets a Kidney but I don't even get a tag.]
To be fair most guards won't be that smart. You are in turn expecting inhumanly rational behavior from all time from all guards. In your game no guard can get scared by smoke bombs and fumble around, no guard would make a slip while stressed, and all guards have a PHD and good training. What about the newly recruited criminal scum turned guard? Would he always go to the exit and be a sentry instead of trying to angrily charge the PC in the smoke?

Guards can have slightly different behavior individually and some might be assholes, though the latter in general are a minority (most people aren't assholes, the assholes just tend to stick in memory), but as a whole a smart AI will behave as i describe. Of course you can have some guards run to save themselves, but you can't design a game around them, they'll be an exception.

I suppose then you're into the territory of differing difficulty levels per guard, which makes it hard to tailor difficulty levels and is probably a pain in the arse to balance properly.

The Thief series did multiple AI types and difficulty settings just fine, as did the Hitman games.

Insert any quote from the "I'm a solo indie dev package, have mercy, I can only do so much!" starter pack here.

I mean, sure, you can spend fucking months working on fireplaces that burn out in real time and a pointless "immersive" REvil inventory case, but you're too "solo dev" to make some better AI...

Per NPC behavior settings aren't hard to make, especially with something modular like a goal oriented system (FEAR1 popularized this and the author wrote a paper about it but several games use this approach nowadays and even Quake 3's AI bots had a simple goal-based approach which would allow for behavior customizations). The main reason NPCs in games behave very similar is for the player to learn and exploit that behavior - remember all the times you played a game, had an encounter (be it in stealth games or whatever) and formed a plan in your head about how to approach it based on the NPC behavior based on previous encounters. This is what similar NPCs do and even why in Thief there are different types of guards with their own clothing, voices, etc - it would be extremely trivial for Looking Glass to just randomize those per spawn, but the developers wanted players to learn the different behaviors.

You can put down one irregular NPC in a few cases to mess with the player's expectations, but that'd be an exception (that if overdone can mess up with the whole learning aspect) like the guard that runs away instead of guarding.
 

Zombra

An iron rock in the river of blood and evil
Patron
Joined
Jan 12, 2004
Messages
10,295
Location
Black Goat Woods !@#*%&^
Make the Codex Great Again! RPG Wokedex Strap Yourselves In Codex Year of the Donut I helped put crap in Monomyth
Weren't different AI behaviours in Thief usually demarked by different enemy appearances (I.e. they're just different enemies)? It's a long time since I played that game.
Been a while for me too. As I recall, dumber guards used the dumb voice but you couldn't tell which was which visually. Seems to me there were visual variations also (i.e. several different guard "looks") but that didn't tell you anything about which AI package they used.

Anyway, what does it matter? It should be easier, not harder, to create multiple enemy types that use the same model, than it would be to make types that both act and look differently.
 

Blutwurstritter

Learned
Joined
Sep 18, 2021
Messages
392
Location
Germany
Thief 1 didn't change ai or awareness of guards with difficulty. It did change number of enemies, patrol routes, hit points and damage, items and item locations and access to paths depending on the level. It could be that some drunk guards are not drunk on hard but generally the same type of enemy has the same ai and awareness as before. Thief 3 does change awareness with difficulty settings however.
 

kangaxx

Savant
Joined
Jan 26, 2020
Messages
870
Location
The Silver Shark
Weren't different AI behaviours in Thief usually demarked by different enemy appearances (I.e. they're just different enemies)? It's a long time since I played that game.
Been a while for me too. As I recall, dumber guards used the dumb voice but you couldn't tell which was which visually. Seems to me there were visual variations also (i.e. several different guard "looks") but that didn't tell you anything about which AI package they used.

Anyway, what does it matter? It should be easier, not harder, to create multiple enemy types that use the same model, than it would be to make types that both act and look differently.

I'm thinking in terms of the player - it's harder for the devs to balance it when you as the player can't identify what the guard is likely to do. It's a similar point to the one being made by the other chap.
 

Zombra

An iron rock in the river of blood and evil
Patron
Joined
Jan 12, 2004
Messages
10,295
Location
Black Goat Woods !@#*%&^
Make the Codex Great Again! RPG Wokedex Strap Yourselves In Codex Year of the Donut I helped put crap in Monomyth
I'm thinking in terms of the player - it's harder for the devs to balance it when you as the player can't identify what the guard is likely to do. It's a similar point to the one being made by the other chap.
Harder to balance? Maybe - but again, it's been done very successfully with other games, and at least speaking for myself I find it really fun gameplay to have to treat each enemy as an unpredictable individual. I don't know what point the other nameless person was making, but in any case it's certainly not a good argument against having multiple different AI enemies.

Another game that did this brilliantly was the Desperados: Wanted Dead or Alive. Different context but a huge amount of the fun there was not knowing how each enemy would react to various stimuli (which sadly was not carried over to the recent Mimimi games).
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Top Bottom