Jump to content
The Dark Mod Forums

Enemy Visibility In Accordance To Lighting?


woah

Recommended Posts

In terms of feasibility, it would perhaps be possible to have a ring around the gem, and the lightness at each point determines how easy it would be to spot you from that direction. Realistically you'd only need 4 to 8 values on the ring to get a good idea, but nonetheless it'd likely be expensive.. hmm. Obviously, it would be utterly impossible to compute for every possible facing angle... But I wonder whether it would even be necessary to compute an individual map for each AI... Would it not be enough to just have 8 maps and use the nearest one?

 

Anyway, returning to the lightgem part, the real problem is whether it would be good for gameplay. IRL, you'd glance behind you to determine whether you were sillhouetted. In game, would this be possible, or as "good?"

--

Somethin' fishy's goin' on here... Come on out, you taffer!

 

~The Fishy Taffer

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

I see no reason why not - it is just a quick turn with your mouse to see what is behind you...

Link to comment
Share on other sites

From the player's perspective, figuring out if you're going to be silhouetted is a pretty visual thing; just take a quick look around and think "am I putting myself between something bright and the AI?" So I don't think it would be much harder for the player to keep track of ingame than it is in RL.

 

I've played some games that (I think) used silhouette detection, such as America's Army: the Escape & Evasion training mission. There was no visibility indicator, but the learning curve was pretty fast. I just started naturally factoring in silhouetting when planning where to move next. I don't personally see the need for the lightgem to tell me how visible I am from several directions all the time. If you're at all aware of your surroundings, you should have a good idea where the bright areas are, and where AI are likely to be facing.

 

From a programming perspective, it would be expensive to keep track of the silhouette visibility from 8 different angles all the time (remember each of these angles is going to need to cast more than one ray, to your head, your feet, left shoulder, right shoulder, etc, and check the brightness at the point it hits behind you). If it's not necessary to display them all the time, you could just calculate the silhouette in the case when you are definitely in an AI's FOV, and calculate it for that AI. (Or, if there are many AI surrounding you and looking in your direction, you can get their sight angles to you and assign an average angle to more than one of them for optimization purposes)

Link to comment
Share on other sites

I'm still not entirely sure silhouettes would be good for gameplay. It would definitely affect your ability to hide in the shadows. A hallway is no longer safe just because you put the torches out along the walls...you have to worry about what is at the end of the hall too, and there's nothing you can do about it until you get there.

Link to comment
Share on other sites

That's where wall flattening would actually help you realistically :)

 

[ Edit: Also, hiding in alcoves on the side of a hallway, behind load bearing columns on the sides of the hallway, inside curtains on hallway windows, etc. Again, it's up to the FM author not to screw up the gameplay in their mission. If the author puts in a long, absolutely straight hallway with flat walls (nowhere to hide on the sides) and a brightly lit wall at the end, then yes, it would be hard to go down that hallway and remain unseen, just as it would be in RL.

 

I think the original Thief's deliberately put darker areas at the edges of hallways also to kind've simulate the fact that you're less visible when you stick to the edges of the walls, even tho their engine wasn't up to calculating silhouettes. ]

Link to comment
Share on other sites

I'm still not entirely sure silhouettes would be good for gameplay.  It would definitely affect your ability to hide in the shadows.  A hallway is no longer safe just because you put the torches out along the walls...you have to worry about what is at the end of the hall too, and there's nothing you can do about it until you get there.

 

 

That is the idea... you should have to worry about what is at the end of the hall, just like you would if you were doing it for real, and it should be more difficult to hide in shadows, otherwise it becomes too easy - the player should have to rely on cover blocking the AI's view a bit more, and rely a bit less on unrealistic use of shadows. For me that would be a vast improvement on gameplay... And wall hugging or crawling prone would be the solution to not having your sillhouette detected so easily, but it would slow you down a lot, so as to balance it out. That would be ideal gameplay for me, and would really ramp up the enjoyment I get out of the game quite a bit... And I would rather look at my hands and feet to see how much light I am receiving, rather than using a light gem. I hope the light gem can be switched off in the options...

 

Deus Ex had more realistic stealth implementation than Thief in a lot of ways, although they could have done a lot more with it...

Link to comment
Share on other sites

Checking to see whether your silhouette is visible would be much more difficult in a game than it would in real life. In the game you don't have an intuitive sense of exactly how much space you take up, or whether your head really is in front of the window. It is also much more awkward to glance side to side (not to mention behind you) while moving around. It's easy to say you want the game to be more realistic, but hiding in real life is actually not very easy indoors...that's why real life robberies tend to happen when people aren't home.

 

If we were to make a 'realistic' thief simulator, the player would rob houses when the people were out for the night...weee, fun.

Link to comment
Share on other sites

I don't think you need to know exactly how wide your shoulders are to avoid silhouetting most of the time. You just stay as close to the wall as possible, (pressing against it if we implement that) and you think twice about whether it's safe to run between an AI and a lit background.

 

We're taking into account multiple points on the body and distance to AI and stuff, so they're probably not going to come searching if they see a bit of foot sticking out of a dark spot 30 ft away.

 

As for observing the surroundings, I don't have much problem looking around and moving when I'm looking for dark spots to move to. I'm not sure why looking around and checking out your potential backlighting would be much different from looking around at the shadows. It's just like any other aspect of stealth; you're less likely to get caught if you move carefully and pay attention to your surroundings.

Link to comment
Share on other sites

Checking to see whether your silhouette is visible would be much more difficult in a game than it would in real life.  In the game you don't have an intuitive sense of exactly how much space you take up, or whether your head really is in front of the window.  It is also much more awkward to glance side to side (not to mention behind you) while moving around.  It's easy to say you want the game to be more realistic, but hiding in real life is actually not very easy indoors...that's why real life robberies tend to happen when people aren't home.

 

If we were to make a 'realistic' thief simulator, the player would rob houses when the people were out for the night...weee, fun.

 

 

I really don't think that knowing how much room your body takes up is that hard to figure out, you get a pretty good idea by observing how close you can get to wall before the collision stops you from going any further. Do you really ever look behind you while you are moving? That is not a smart thing to do, especially if you are in a strange dark place where you are trying to be stealthy. The sensible thief will of course stop moving before looking around. And not being able to tell exactly if you are 100% properly hidden or not is part of the fun - it makes it more challenging and exciting when every now and then you slip up and have to make a run for it, or quickly duck for cover before the AI goes to the next stage of alert...

 

And naturally, a thief would prefer to rob a residence that is unoccupied, but you are wrong about about real life robberies - actual crime statistics show that they happen just as often when the occupents are down one end of the house having dinner or watching TV, and the thief is down the other end raiding the bedrooms etc (this is from an article I read in a magazine, with interviews with actual thieves - I'll try and track down the article if I can). Anyway, the FM author will give the player a reason for being in an occupied building - that is where the story kicks in - you might have to burgle a mansion that is guarded 24/7, and has live in servants etc, which is hardly uncommon for a wealthy residence, so that would not be at all unrealistic.

Link to comment
Share on other sites

In real life, it's very easy to get a good idea of how well hidden you are. You can glance down at your body to see whether it's dark, you can glance at the wall behind you to see what colour it is in relation to yourself, and you know, having espied a patch of shadow on the wall from down the corridor, that you will fit into it, because you know how big you are.

In-game, you have no such method of glancing - there's no way of knowing how shadowed your whole body is, without flicking the mouse downward - a movement that is FAR more cumbersome than looking down, and makes movement more difficult, too. Likewise it is impossible to glance to either side to check the wall you're hiding against is a similar colour to yourself, and if you see a spot of shadow you have no way of knowing whether it's big enough because you have no feedback from your muscles telling you where your limbs are. This is the one big reason in favour of third person for games - because in real life, other than the fact that you can't see the back of your head, you have a very similar view of the world - a view to the side more like 180°, the ability to look around you without impeding movement, peripheral vision (and being able to swiftly look in the direction of movement detected,) sense of your own body and so on.

Hopefully I've conveyed why things like the lightgem are useful - your hands after all are not the only bits of you that are illuminated, and with a straight-ahead view you need to take for spying enemies and loot, you can't see anything else of you.

 

While I'm an advocate of trying out sillhouetting, I wouldn't tout it as something huge... It could be a massive flop, making hiding too difficult and gameplay near impossible. Of course, it could heighten realism and make for a far better experience, but that remains to be seen. One thing that would be necessary to make it work is, as you say, sillhouette-minimising features, such as going prone to crawl across open spaces... I can imagine that being SO immersive - if you try it standing up you're spotted immediately, but going in on belly... bam! Wall flattening, too - it would be far better if more realistic.

--

Somethin' fishy's goin' on here... Come on out, you taffer!

 

~The Fishy Taffer

Link to comment
Share on other sites

While I'm an advocate of trying out sillhouetting, I wouldn't tout it as something huge... It could be a massive flop, making hiding too difficult and gameplay near impossible. Of course, it could heighten realism and make for a far better experience, but that remains to be seen.

 

Yep, that's my take on it as well. As someone who used to play a lot of paintball and nighttime 'capture the flag' games, I'm no stranger to real-life hiding. The simple act of moving forward while looking in a 180 degree arc to your left and rear is highly difficult in a computer game.

Link to comment
Share on other sites

Not only that, it's highly difficult to implement without requiring the user to control something with their mouth or third arm. There's no other way that I see if having decent control (or at least, control such that we have it in computer games at the moment) over both body/arms and head.

--

Somethin' fishy's goin' on here... Come on out, you taffer!

 

~The Fishy Taffer

Link to comment
Share on other sites

As obscurus said, you can still stop, take stock of your surroundings, plan your actions, then move. It's much like going for shadows; you look around a room from some vantage point, get an idea of where the dark spots are, then you can move to them quickly. Or, if you're being less careful, you can try to figure out where well-shadowed spots are by glancing around on the move, but that is a bit harder.

 

I don't see why observing and remembering brightly back-lit areas is any different from observing shadows, AI, and anything else in the map.

 

As to it destroying the whole gameplay: That's why we can tweak the weighting of silhouetting in the AI visibility formula.

 

I.e., AI visual alert = F( distance to player, light directly hitting the player (lightgem value), background texture along LOS (silhouetting), fraction of body visible )

 

You can tweak the actual weighting of those variables however you want, from silhouetting having a huge effect to having almost no effect.

Link to comment
Share on other sites

As obscurus said, you can still stop, take stock of your surroundings, plan your actions, then move.

 

Nobody is arguing that. But you don't have to stop in RL in order to look around. Forcing you to stop in the game makes it more difficult to keep track of your silhouette. Shadows don't usually move, so you don't need to keep track of them as you're moving. But whether or not you're in between a guard and a light spot DOES change as you're (and the AI is) moving, so it's not quite the same thing.

 

I guess it depends what kind of silhouettes the AI can detect and how easily they notice them. I'm not against the idea, I just think it needs to be approached with caution.

Link to comment
Share on other sites

To introduce you to an actual example, I remember a few times when this type of thing actually entered into playing TMA. Usually, you could just wander around wherever the floor is dark, but in actuality, if the light is oblique, not perpendicular to the floor, then just standing on a shadow will not suffice. You have to imagine the cross section of the shadow in mid-air, and this is very difficult, real life or in-game. What you'd actually do is, when you're approaching the dodgy area (e.g. underneath a window) look up at the light source, and your mind automatically works out whether the light will go past your head or intersect your body - you can't really work this out from a way off; you have to be practically looking back at the light in the same direction the light is hitting the floor.

 

I hope you understood - this situation requires you either to trial-and-error where you are, looking at your lightgem until it goes dark, or to drag the mouse around as you get there, requiring you to stop moving.

These situations would be FAR more frequent, unfortunately, which as why, as Springheel says, it must be approached with caution. There's no point in having sillhouetting taking virtually no effect, just to save gameplay from it. Might as well not have it in the firstplace. (Although it could probably be mitigated with features like wall flattening, prone and so on)

--

Somethin' fishy's goin' on here... Come on out, you taffer!

 

~The Fishy Taffer

Link to comment
Share on other sites

The simple solution to looking around while you are moving is to bind a key, say CTRL maybe, to a finction that enables you to look around while you are moving but doesn't let you turn. While you hold the key down, moving the mouse moves the view without affecting the direction the player is moving in, when you let go, you go back to the normal mouslook mode. A very simple, elegant solution IMO, and it should be quite trivial to code as far as I know.

 

If you really wanted to you could use the turn keys as well while holding down the no-turn-look key, allowing for some pretty complex movement capability, although I can't see anyone doing that.

 

Are you going to have the "body awareness" thing that TDS had, where you could look at your feet when you climbed a ladder etc? For me, it makes the game a bit more immersive, because I don't feel like I am invisible to myself, but I understand if it is difficult to code...

 

Obviously it is very hard to give the player in a computer game anywhere near the same sense of awareness in a computer game as they would have in RL, but I really don't see how sillhouettes could be a problem if implemented well, provided they don't put too much of a drain on the CPU...

Link to comment
Share on other sites

Well... I wouldn't be surprised to see a lot of annoying instances where the game decided your sillhouette was visible and you didn't think it was.

 

I like the current system of hiding in the shadows just fine. It's confusing enough as it is with the AI alert states having different vision cones.

 

At the moment I feel like it's a case of "don't fix what isn't broke".

Link to comment
Share on other sites

I like the current system of hiding in the shadows just fine. It's confusing enough as it is with the AI alert states having different vision cones.

 

What do you mean? In our code at least, the FOV cone remains the same regardless of alert state. The visual acuity is what can increase with higher alert state (although it doesn't have to).

 

To people who are doubting their ability to enjoy the game with silhouette detection enabled, I'd suggest playing a game that does this before passing judgement. The only one I've had expereince with is that America's Army training mission (the Escape & Evasion mission, don't know if it's even in the latest version as this was a year ago).

 

After a while you get some idea of how far out your virtual "shoulder" extends from your body, even without body awareness. An analogous situation is walking on a beam (again without body awareness). You have no feet, but you know that your collision box extends a little in either direction, so after a short time of playing you have an idea of how far sideways you can walk before you fall off the beam.

 

It also applies to combat. You need to have an idea of how far your body extends out when you're trying to say hide behind a pillar when an AI is shooting at you, or dodge an AI that is swinging a sword at you.

 

This player knowledge of their bounding box is needed for so many things we're implementing. I don't think it's a good argument to rule out silhouette detection because it also requires that knowledge.

 

Again, we can build in some leeway for the player by controlling how visible they are when only their shoulder point is sticking out vs their whole body, etc.

 

Anyway, I don't think we should forget about implementing the feature simply because it could potentially be implemented badly. I don't think anyone is suggesting that, but just want to make sure.

Link to comment
Share on other sites

Well... I wouldn't be surprised to see a lot of annoying instances where the game decided your sillhouette was visible and you didn't think it was.

 

I like the current system of hiding in the shadows just fine.  It's confusing enough as it is with the AI alert states having different vision cones.

 

At the moment I feel like it's a case of "don't fix what isn't broke".

 

 

I really don't see the game doing that unless the code was really buggy, and that is part of the element of surprise for me - you thought the AI couldn't see you, but you were wrong! A bit of randomness is good. For me that would be great - I found the system Thief had, where if the lightgem was black the AI couldn't see you, too simplistic, and it annoyed me after a while, because there were plenty of situations where the lightgem said I was invisible, but in RL I would have stuck out like a sore thumb, and ishouldn't have gotten away with sneaking past a guard in a certain place without him noticing me. I really don't find the current system in Thief at all confusing, quite the contrary, it is too dumbed down for my liking.

 

As far as I am concerned it is broke, and needs fixing :)

Link to comment
Share on other sites

Btw, while we're discussing this, just curious what people think of this implementation idea:

 

No body awareness for now.

 

Keep track of 4 points, which are just stored as translations from the player's origin:

 

head, left shoulder, right shoulder, feet (just the centerpoint of the lower face of the boinding box, one point for both feet since they are usually close together)

 

for each AI that can see the player (any player body point is within AI FOV)
{

     for each of the four points
     {
           calculate direction vector from AI's eyes to player body point

           do trace starting at player body point, along the direction calculated above

           get the coordinate at which the trace hit solid geometry

           somehow obtain brightness of that point

           assume the player is black, so the contrast you get is the brightness of
           the point.  Store the brightness as the "silhouetting value" for that point
           on the body, for use with overall visibility calculation later on.

      }

}

 

NOTE: I'm not sure what the best way to obtain the brightness of the point we hit. Worst case, we could use a render camera that is very zoomed in, only rendering the texel at that one point, and get the brightness of the image. This way, it will be very accurate, what you see is what you get. A white wall will reflect brighter than a black wall with equal lighting hitting both, and we just assume that the player is a black.

 

Then to make wall flattening work realistically, we just shrink the player's bounding box when they flatten against the wall. This should update the position of the test points on the player's body, since they are referenced to the bounding box. It also means AI will be less likely to brush up against you when you're flattened.

Link to comment
Share on other sites

NOTE: I'm not sure what the best way to obtain the brightness of the point we hit.  Worst case, we could use a render camera that is very zoomed in, only rendering the texel at that one point, and get the brightness of the image.

 

I already do something like this with the new lightgem calculation.

Gerhard

Link to comment
Share on other sites

@Isht: that sounds like it would work, although you might need an additional couple of points, perhaps at the midriff. The only reservation I have is that if, at the points you described, there's a splodge of white, and then outside that, there is darkness, we have a problem. Basically, it wouldn't take into account the thickness of the body, which would also have an impact when calculating the size of the sillhouette.

 

I dunno :/

--

Somethin' fishy's goin' on here... Come on out, you taffer!

 

~The Fishy Taffer

Link to comment
Share on other sites

Checking the -surface- behind the thief could also be misleading. If I'm standing in front of a shaft of light I'm still going to be silhouetted, even if the wall behind me is dark.

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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • 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
×
×
  • Create New...