About Store Forum Documentation Contact

 Stealth - Thoughts and Questions Author Message
Myx
Member

 Post: #1 Stealth - Thoughts and Questions Hello again! So I looked at my Todo list and next up is Stealth. Now I've had some thoughts on this, but I feel that I need a bit of help and input on the subject, so here we go. My general thought on Stealth is that the player has a Stealth Factor which is a float between 0 and 1. 0 Is completly visible and 1 is pretty much invisible. Implementing the functionality behind the Stealth Factor wasn't very difficult, however calculating it has proven a bit harder. My current thought on how to calculate the Stealth Factor is to check how much of the player's shadow overlaps with other shadows and simply base it on that. So my question: How do I do that? Code examples would be greatly appreciated. Thank you for reading. //Myx
01-09-2010 05:14 PM
Myx
Member

 Post: #2 RE: Stealth - Thoughts and Questions It appears that actually comparing shadows is difficult/impossible. So new ideas: Is it possible to... ... check the current light-strength at a certain point? ... check how much of a character is coverd in shadows? ... find the "strength"/intensity of the shadow at a certain point (right below the player's feet in this case, not counting the player's shadow)? Any of these would do to calculate my stealth. If anyone can come up with another way to implement stealth, speak up.
01-16-2010 01:52 PM
Esenthel
Administrator

 Post: #3 RE: Stealth - Thoughts and Questions Hi, you can calculate the distance of the position from light, but there's no way to get the "shadow" factor, as it is computed on the GPU, and stored in render targets you could however make world/level with static lighting (so shadows will always be in the same places), and place on the map some "markers" where are the shadows. you can use the custom object for it, or use waypoints somehow. another approach is to place some dummy "occluder objects" on to the level and then manually calculate wheter light reaches the player, by checking if along the way is any occluder by occluders I mean just few simple boxes. you can place them using custom objects, but don't render them in the game. just use for light ray-casting
01-16-2010 05:00 PM
 « Next Oldest | Next Newest »