Tuesday, September 9, 2014

Stealth Kids Game

This week my team decided to explore a co-op stealth game. The setting of this game takes place in a 1950's house. The main characters are two kids that are trying to sneak cookies without their parents knowing. This week I made a basic game play prototype to show off the kind of mechanics we would have in our game.



An interesting part of what I did this week was my detection implementation. The initial goal was to create an accurate cone of vision for the parent. I decided that an easy way to do detection that would not see through walls would be to use Unity's line-cast or ray-cast systems. So I created an object that would take a start point, an angle, and a distance for line casting. It also had a line render attached to it so that the detection could be displayed. From here I wrote a generator script that took in an angle range and a transform and then created these line renders around the given transform. In the picture above I have a parent with a range from 0-70 degrees creating a cone like shape of vision.


In this second picture the kid is in range of the parent but is not detected because the line-cast does not go past other objects.