Stealth Extended

My goals with this project was to learn more about Mecanim and root motion in particular, get some experience with reverbs and the various audio filters in Unity 5, attempt to create a passable GTA 5 style character controller and camera rig, and try to create some interactable world space GUI using the new Unity GUI. And of course to play with the Stealth tutorial assets to see what I could do with them because these assets are very well made.

Overall I feel like I accomplished what I wanted. First of all I think I can safely say that I dislike root motion. I don't think it gives you enough control over your character and it's awkward to work with. That is unless I'm using it completely wrong. There's still some Mecanim/root motion things in this project from the original tutorial or the standard assets third person character controller I don't entirely understand.

As for audio I still need to try more things with reverb and filters, what's in this project is a bit unpolished, but it's a start. I ended up creating my own audio manager which controls every audio source in the game. Whenever a sound is played the audio manager calculates the distance between the audio listener and the audio source and checks whether or not the source is occluded (line of sight check to the listener) and then tweaks the pitch, volume and a low pass filter accordingly. I playtested it with some headphones and it gives a pretty good indication of where sounds are coming from, but like I said it still needs more work.

My GTA 5 style character and camera rig turned out okay for a first pass. It's loosely based on the third person character controller found in the Unity 5 standard assets. I will tweak it more in the future. I will wait until GTA 5 gets cheap on Steam so I can compare it to the real deal played with mouse and keyboard. When I made this I only had GTA 5 on Xbox 360 to compare with.

I also added two "mini-games" to the terminals controlling the laser fences. There's now a keypad on the terminals which requires a code before you can turn off the laser fences. Some terminals require you to hack them to succeed.

​My extended version still has the same premise. Your goal is still to get to the lift and exit the level, but I've changed a lot of the stuff in between. 

Here's a mostly complete list of all the changes I've made to the original project:

  • Added a keypad to the terminals using the new GUI system. All the terminals require a password. The passwords are usually hidden around the level. Some terminals may also require you to hack them.
  • Added a hacking mini-game to the terminals.
  • Added an audio manager which controls every audio source in the game. Whenever a sound is played the audio manager calculates the distance between the audio listener and the audio source and whether or not the source is occluded (line of sight check to the listener) and then tweaks the pitch, volume and a low pass filter accordingly.
  • Added roofs to all the buildings. Entering a building enables reverb and changes the ambient sound.
  • Changed the perspective from top down to third person.
  • Added a GTA 5 style character controller with a camera rig that checks for collisions with the level geometry and moves to avoid it.
  • Added an in-game menu with a slider for controlling brightness through a simple image effect as well as a volume slider.
  • Made it so the doors also open/close when the robot guards walk through them, and changed the waypoints for the guards so they enter buildings. You're never safe.
  • All the cameras now animate from side to side and if they spot the player they lock onto him until he leaves their field of view.
  • Added a red glow to cameras and a fake volumetric lighting effect to easily visualize for the player their field of view.
  • Made it so the player can crouch. Useful for hiding under tables or behind obstacles.
  • Added zones under tables where the guards can't see you even if you are in their line of sight. Useful for avoiding frustration caused by thinking you're safe and suddenly being spotted.
  • Made it so the robot guards actually look up/down depending on where you are. This had to be done for them to detect the player if he crouched. Now the guards always look towards the player's head. They also aim towards the player's head when they are in the shooting state.
  • Added proper footstep sounds to the player and the robot guards which trigger when their feet touch the ground.
  • Changed the geometry of the level a bit, mainly just as an exercise to see how easy it was to tweak non-source assets like .fbx-models.
  • Changed the setting for the level. It's no longer a training excersise in some facility. It's now an secret base outdoors in the mountains with a starry sky.
  • Changed all the materials to the standard shader. There's no proper roughness maps etc. for them, but when I changed the render path to the new deferred renderer all the old materials broke so it was necessary. The game has almost the same look as before, but if you add roughness maps I expect it to look a lot better.
  • Changed it so that when a guard sees you only he comes running, and not all the guards in the level. If he hears you he instead walks to investigate. Also changed the range at which guards begin shooting to make them run after you if they see you rather than just shoot you instantly. It's scarier and more fun. If the player triggers an alarm (laser fence or camera) all the guards come running.
  • Added the Bloom V2 image effect from the Unity Labs project. It's better looking than the default bloom and in low quality mode it's faster as well.
  • Added Thomas Hourdel's Subpixel Morphological Antialiasing: https://github.com/Chman/SMAA

The original tutorial is available from the official Unity site here:
https://unity3d.com/learn/tutorials/projects/stealth-tutorial-4x-only

If you want to follow the tutorial from scratch in Unity 5.x before you look at all the changes I've made to the project there's a support thread for doing the original tutorial in Unity 5.x here:
http://forum.unity3d.com/threads/tutorial-project-stealth-under-unity-5-x.308908/

In case you missed part 1 of my extended series, it was based on the Surival Shooter tutorial:
http://twiik.net/projects/survival-shooter-extended

Øyvind Strømsvik's picture

About Øyvind Strømsvik (TwiiK)

I've been passionate about games all my life and started dabbling in game development about 15 years ago with BlitzBasic,... read more but I quickly lost interest and began doing 3d modeling instead. 3d modeling remained a hobby and I picked up game development again around the release of Unity 2.0. My driving force behind wanting to get back into game development was my lost interest in commercial games as they started appealing to a group of gamers I was no longer in. Indie games were the only games that still looked interesting, but at the same time some of them looked like they would be just as fun to make as to actually play. And many of them were made by just one guy.

Tagged with: 3D, Unity

Standalones

Windows:
Download v.1.0.2 (79.51 MB)

Mac:
Download v.1.0.2 (83.12 MB)
Alex's picture

Alex

I really like the GUI on the terminals and the audio. Really cool changes overall.

- Alex

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Alex: Thanks, it means a lot.

Karen's picture

Karen

I love it! :)

But what's with the green terminal? I can't find any passwords for it and it's not hackable. Halp!

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Karen: I'm sure you can find a clue if you download the project and take a look at the source. There's a clue visible in the last screenshot on this page as well. :)

PS: Don't get your hopes up as to what the green terminal actually does though. :p

sps's picture

sps

It's awesome. Thanks for sharing.

Max's picture

Max

Hey when I try and get to the exist in the game the lift door doesn't open, is this because in ran to exist door without turning of the switches

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Max: Haha, to be honest I don't remember the victory conditions for this game. I think the keycard is still in the game? So perhaps you need to find that.

But I honestly don't remember. :p

David's picture

David

Hi, very nice demo. LOL

I will download and will use it to prictice with my new Fmod 101 certification skllis. if you don't have any problem. is ok?

thanks

Øyvind Strømsvik's picture

Øyvind Strømsvik

@David: Thank you. :)

Do what you want with this project. :)

David's picture

David

@Øyvind Strømsvik:

Thanks, i will try to remake the sound using Fmod Studio (Midleware Sound Software).

Thanks

Tomas's picture

Tomas

Hi Øyvind,
thank you for all of your beautiful work. I already used your game project Pong for basic experimenting with the world of game audio. I wanted to take next step with the Stealth Extended project, but I have problems controlling the game. After the game starts, I am not able to jump, open the minimap and do other things. I can only walk, squat (switch) and run. Am I doing something wrong? I have to be sure that the game is working properly before I start implementing sounds.

Thank you,
Tomas

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Tomas: There is no minimap or jumping in this game. What lead you to believe that? :) I'm fairly certain the available controls are written in an included README-file.

The basic gameplay is the same as in the original tutorial.

Tomas's picture

Tomas

@Øyvind Strømsvik: I saw these controls (jump, minimap, etc.) in the settings window (resolution and input) that pops up after you start the game.
Thank you for your answer. I will check out the README file.

Øyvind Strømsvik's picture

Øyvind Strømsvik

@Tomas: Ahh, right, those are default from Unity. I guess I should check and see if I can disable those or at least remove those I don't use. Thanks for letting me know. :)

Harley's picture

Harley

hey man great project. really having fun using to practice fmod and unity integration. just had a question regarding the layer mask for occlusion. i'm not sure what needs to be culled on the layer mask pop up menu. can you remember what setting it was on?

Much appreciated.

Harley's picture

Harley

@Harley:
I figured it out in the end :)

Robert Harley Matthews's picture

Robert Harley Matthews

Hello, im encountering a glitch where the camera spins out of control and auto rotates, usually happens when i run into one of the buildings? any ideas on what the issue could be.

SJS!'s picture

SJS!

Nice one. Just 1 request can i use this project for my learning purpose and extend your work further Øyvind??

Øyvind Strømsvik's picture

Øyvind Strømsvik

@SJS!: Sure, whatever you can do with the official Unity projects you can do with this one.

SJS!'s picture

SJS!

@Øyvind Strømsvik: Thankx, helping a lot to learn.

Add new comment

1.0.2 - January 8, 2017
  • Upgraded the project to Unity 5.4.4.
  • Added a quit-button to the pause menu because there is no Web Player anymore, only standalones.
  • Added Windows and Mac standalone builds.
  • Made it so no character or camera input registers while the pause menu is open.
  • Tweaked some shadows that changed in Unity 5.4.
  • Added a README.txt to the project.
1.0.1 - January 1, 2016
  • Upgraded the project to Unity 5.3
1.0.0 - July 26, 2015
  • Initial release

There are no known issues or planned features at this time. If you've encountered a bug or have suggestions for additional features feel free to leave a comment and let me know.