Thief Like Stealth Systems in C#. Please Help!!!
I'm lost in programming my idea, can someone help me? So, for any one that has played Thief I'm trying to craft a stealth system like that game using the dynamic shadows from unity using C#. Can someone help me?
Answer by JincSoft · Oct 28, 2016 at 10:48 AM
A system like this is going to be a challenging one (not impossible though) so I'll break it down into the concepts you'll need to program. I won't give you code because that would take far to long for an answer and you don't get the satisfaction of making it. I also won't be going over specific AI concepts because that's another large topic. If all else fails, there may be something on the Asset Store.
Detection Script - A script that would handle the aggro or suspicion level on that character. Probably would want a way to adjust how fast it raises and falls for variety. I would probably do a form of a raycast from the characters "eyes" to tell if he could see the player or not. The range and angle should be adjustable as to match the character's vision capabilities. Once the suspicion level raises past a certain point, then go and attack the player, if he loses sight for too long, drop the suspicion and hunt for the player.
Static Shadows - A primitive collider (or mesh collider if it's odd enough) that reduces the incoming suspicion value for all enemies "looking" at the player that matches the shape of the shadow. If an enemy has a flashlight, torch, night vision, etc then you can stop the reduction if the player is within the light the enemy is holding (a cone collider would work just fine on a flashlight).
Dynamic Shadows - This is a lot more difficult because I am not aware of a way to detect shadows that is built into Unity. For this I would write my own system that tracked pre-planned shadow movement that would look like it's fully dynamic.
Player - The player should have actions, like running or moving in front of an enemy, that would add suspicion to anyone within a given radius for each action.
Misc - Things moving around, getting dropped, or stuff that would tip off an enemy are examples of things that you would need to add more realism to everything.
Similar Question:
http://answers.unity3d.com/questions/24662/detect-lightshadow-falling-on-object.html
Old Unity 4.x Stealth Tutorial
https://www.youtube.com/playlist?list=PLX2vGYjWbI0QGyfO8PKY1pC8xcRb0X-nP
Answer by xXSilverswordXx · Oct 28, 2016 at 01:45 AM
people will probably want to know more about what you want in order to help you. ive never played thief myself, and i also cannot code. HOWEVER, it is a suggestion. Make the request simple to understand.
Answer by ericDEV · Oct 28, 2016 at 11:54 PM
I would like to thank all replies. I will be working on improving my questions and coding the scripts that I will use in this project. ps. if you haven't tried Thief I command the second game, its more player friendly.
Your answer
Follow this Question
Related Questions
Finding Boundaries of a Cover Object 1 Answer
Game Object Positioning 1 Answer
enemy not spotting player? 1 Answer
Pinball Flippers Control with multitouch 0 Answers
Access to script from another scene by the main menu 2 Answers