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:
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:
In case you missed part 1 of my extended series, it was based on the Surival Shooter tutorial:
- 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.
- Upgraded the project to Unity 5.3
- 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.