Monday Project – Unity3D 2D Stealth Game

Woke up this morning feeling pretty good. Its nice to be able to sleep in a little bit these days. After some coffee, errands, and a shower I decided to sit down and give a shot at creating a very basic stealth mechanic. I’m not talking Hitman stealth mechanics, I’m talking similar to the grand-daddy of them all, Thief. In thief you play, you guessed it, a thief who has the ability to hide in the shadows and remain unseen. The player is given an on-screen indicator showing how visible they are. This indicator is called the LightGem. When you enter a lit area, your LightGem will change it’s texture based on how lit you are, which in turn helps decide how likely it is for an enemy to see you. There are also other factors such as sound, objects out of place, etc, but I wanted to start small and simple.

I decided that getting a working light detection system was clearly the first thing needed in this proof of concept, considering that is the core of the gameplay of Thief. A few hours after starting I have come up with the following. I use 2DToolKit for the sprite management and NGUI for the UX sprite management. Let me know what you think. I may write a tutorial later on explaining how I did this.

Move with arrow keys or WASD.

You can view the core code for this project by clicking here.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>