Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Games Stealth Kill VR - Inspired by MGS VR Missions, but actually in VR

Discussion in 'Projects In Progress' started by SkyYurt, Feb 7, 2021.

  1. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    6 years ago
    6 years ago (WOW!) I made following game:
    https://forum.unity.com/threads/finished-in-24-hours-stealth-kill.249363/

    It was a short game developed within 24 hours, where the goal was to eliminate targets without being spotted.
    I made that game within 24 hours to challenge myself, because I hadn't been able to release any of the projects I had worked on previously, which really hit my motivation.

    Around the time I made that game, I had become very fond of stealth games thanks to the Metal Gear Solid series, hence the inspiration for Stealth Kill came from the MGS VR Missions.

    New Challenge
    Now I want to challenge myself again and build a VR game.
    I've always had following thought: What if MGS VR Missions was made in actual VR. This led me to the idea of building a VR Missions inspired Stealth game in VR.

    This game WILL take more than 24 hours to develop (a lot more :D)

    The Idea
    The final game will contain various VR missions that the player needs to complete.
    These missions will be categorized in stealth, weapons, etc.
    Each category will end with some form of boss battle that uses elements learned throughout the category.
    The world will be set in a VR simulation built of cubes similar to the other game.

    Videos
    Gameplay



    Stealth Takedowns


    Combat



    Feedback and comments are always appreciated!
     
    Last edited: Nov 5, 2022
    Gekigengar likes this.
  2. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Sound System

    To simulate a more realistic sound system, I've been working on a way of simulating how sound travels in the game world.
    The idea is to limit what agents are able to hear from another room and make them more engaged.

    agents will react to sound, if they aren't busy doing something else.

    The system uses a combination of the Unity NavMesh system and raycasts to simulate how the "sound waves" moves towards the agent.

    I've also added an urgency meter that controls how agents react. E.g. If they hear footsteps they might go investigate, but if they hear gunshots, they'll call nearby friendly agents and investigate together.

    With this system I should be able to easily add mechanics like throwing objects to distract enemies or knock on walls to lure guards towards a point.

    Video
     
  3. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Knocking on walls

    Using the Sound System (shown in previous post), I was able to implement the "knocking on walls to lure guards" feature :)

    Video
     
    KeyxvanlIerop likes this.
  4. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234


    This week I have been working on the mood and feel of the game.
    This involves making basic levels, adding sound effects and music, and trying to get a universal feeling that matches with each element in the game.

    The short video above demonstrates what I aim for.

    Moreover, I have recreated few levels from MGS VR Missions to test out Game Mechanics and to get a better understanding of what works and what doesn't:

    EvAm9WgXUAUx14d.jpg

    EvAlzUuXEAAWLlo.jpg EvAmAiZWgAYbOGi.jpg EvAmN49XUAACUaO.jpg
     
  5. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234


    For this week I have worked on a surveillance camera mechanic.
    The camera basically scans for enemy targets and then sounds the alarm if it spots something.

    I also built the initial 8 sneaking missions, by first planning them on paper, then drawing them in drawio and finally creating the levels in Unity and adding enemies and interactable objects.

    Missions in drawio
    upload_2021-3-12_19-55-50.png

    mission screens:
    upload_2021-3-12_19-56-25.png

    upload_2021-3-12_19-57-1.png

    upload_2021-3-12_19-57-24.png

    Interested in testing the game?
    If you have a VR headset and are interested in testing out the game, then please join my discord server:
    https://discord.gg/uCm6d3HDxq

    When the game is in a relatively playable state, I'll release a dev build.
    I would really appreciate it if you could test it out and give feedback. More info will be added in the discord server, when we get there.
     
  6. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    If you're interested in helping out and testing out this game, please join my discord at:
    https://discord.gg/uCm6d3HDxq

    I have already released first test build.

     
  7. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
  8. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Version 0.1.2 is now live on itch:
    https://sky-yurt.itch.io/stealth-kill-vr-test-build




    This update focuses on the Guards.

    Improvements has been made to the general AI and added some new voice over.

    Full Changelog
    • Improved AI
      • Added Awareness levels (Normal, Cautious, Alerted), which adjusts the Guard's FOV, readiness and reaction time on the go
      • If a Guard loses sight of the target, another guard will tell him where to look, if that guard is able to see the target
      • Adjusted the sight of the Guards: Now they scan the target instead of directly looking at the center of the target, which means that now they will be able to spot the player, even if they are only able to see the top of him
      • If Awareness level of the guard is Cautious or Alerted, they will aim at investigation point while investigating
    • new voice over lines added for the guards
    • Refined the blood particle effect


    Feedback needed!
    Now it is your turn to abuse the AI and record it! tell me what is bad about this game and what is great. This way I can improve it!
     
  9. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    This one took some time.




    Weapons System
    I'm a sucker for realistic gun mechanics, so this was my top priority when I began working on a weapons system. I wanted it all: from trigger discipline to trigger safety switch.

    I first started developing the system from scratch, but quickly found out that this wouldn't be a realistic move if I were to release this game anytime soon. So I began looking up solutions online.

    Found various implementations and packages to try out and see if something fit my needs. Most of these were too much "arcade" and too little "realism", or didn't really have any ways for me to test out their system before buying.

    Finally found a weapon system that the dev made with realistic gun mechanics in mind, but this package was long deprecated and wasn't supported anymore. This was a common characteristics of most packages. Devs lost interest or didn't have time to continue their projects.

    However, this was the closest I would get to a complete weapon system that aimed for realism, so bought the package and imported it into my project....aaaand nothing worked.

    The documentation was out of date.
    the scenes didn't work.
    all physics layers had shifted (as I already had my own layers).
    the system didn't work with steamvr's default interaction system (which meant I had lost finger/skeleton animations and all previous mechanics).

    The dev however did have a lot of tutorials on his youtube channel. Watching these tutorials and looking at his Inspector window I was able to set up my interactions as he had his, and after 2 days I was able to do the stuff that his package promised was possible.

    Next goal was to get the hands working again. The weapon system that he had built relied exclusively on using the skeleton poser. The system would animate using blending to simulate the grapping of the firearms.
    I had to remove all code related to this and add in hands that were mapped to the VR controllers so that I could move my fingers freely.
    I also had to rewrite part of the codebase for interacting with items, so that I could add in poses for grapping stuff (my previous fix had broken this, so I had to redo it, so that it worked with the new system).

    Took some time to get it working and there are still some funky stuff that needs adjusting, but overall I'm happy with the results.

    What do you think?

    You can try out the gun range shown in the video above, at my discord server:
    https://discord.gg/uCm6d3HDxq
    Let me know which VR headset you have when you join and I'll assign you with the correct role, so you can join our playtesting channel.

    If you want to try out the latest "public" test build, then you can do so at:
    https://sky-yurt.itch.io/stealth-kill-vr-test-build
    This test build contains 8 sneaking missions.


    What's next?
    Right now I'm focused on reworking past mechanics like knocking on walls and throwing magazines to make sound, so that these also work with the new interaction system. Afterwards, I'll try to add in two handed weapons like rifles and try out the virtual stock that this weapon system includes, hopefully this will be less of a hassle now that I have a better understanding of the system.


    The weapon system package I used
    You can get the package from here:
    https://twitch375.itch.io/v-armory-vr-firearms

    I do recommend this system if you are looking for implementing realistic weapons in your own game.
    But beware: the dev has deprecated it and the system won't work out of the box. It got a steep learning curve and a lot of stuff needs adjusting.

    He is however active on his discord server and recently say that he would like to continue working on it, so it might be a good idea to keep an eye on it.

    Also the dev has a demo build on his discord server, be sure to check that out first before buying it.
     
  10. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Now also got Assault Rifles working.



    Next I'll work on creating levels designed to test the skill of the player with these weapons.
     
  11. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Weapon Missions / Handgun



    Created the first 8 handgun missions.

    Each weapon (even rocket launchers and grenades) will have their own set of missions.

    Each mission category will end with a boss battle of some kind, in which the player needs to use their newly learned skill, if they want to defeat the boss.
     
  12. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Guards will now use cover

    cover.jpg

    Whenever a guard spots the player, they will alert nearby guards.
    If they got a working walkie talkie they will alert the Command Post, which in turn will alert everybody.
    Guards within the walkie talkie radius will run towards the incident, while all others will stay on alert.

    walkie.jpg

    Alerted guards will run towards the alert point, if they're not busy fighting another target.

    Whenever a guard is alerted and reaches the alert point, they will enter the Combat state and their first course of action will be to find the best suitable cover. They determine this cover by looking at following parameters:
    • The cover's distance to the player.
    • The cover's distance to the guard.
    • If the cover is already occupied or not.
    • If it covers the guard against its' target.
    Once the guard has found a cover, he will run towards it, unless the cover is close by.


    Behind the scenes, the Cover Spots are represented by spheres. If a sphere is red it means it has been 'reserved' by another guard and other guards wont consider that as a suitable cover option while seeking a cover.

    cover_bts.jpg
     
  13. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Testing out the AI of the Guards

     
  14. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Added in new weapon types and attachments

    It is now possible to use handguns, smgs, assault rifles and snipers.

    I've also added in attachments like scopes and suppressors, that can be attached to the weapons, changing the stats of the weapons.
    E.g. If you add a suppressor, the weapon will be more silent, which using the Sound System, will automatically make sure that guards only close by will hear it being fired and guards far away won't.

     
  15. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Retinal Scanners

    Some doors will be electronically locked and is only accessible by authorized personnel. You have means of acquiring such personnel.



    Each person in the game has a retinal eye with access level attached to their head. The player has access level 0 and the default guards have access level 1.
    For the retinal scanner to activate and unlock the door, a person needs to approach the scanner and look directly at it.
    If they have sufficient access level, the door will unlock.

    The system is trigger based, so I'm able to change the door and retinal scanner out with something else.
    I could for example add a hand print scanner that activates an elevator or something.
     
  16. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Climbing and Grabbing enemies
    You are now able to climb obstacles and grab enemies.



    You will use the climbing ability to reach higher grounds, to avoid enemy contact and to find better routes to reach your objective, unnoticed.

    The video also shows the initial version of enemy takedowns.
    Using "Active Ragdoll", I am able to combine default animations together with physics. This means that while guards still play their animations, the player is able to grab them and manipulate their limbs.

    This opens up for great features like the ability to use CQC to knock on enemies arms, so that they drop their weapons or grab their legs from below, to make them lose balance and fall. This feature will be expanded more in the future.

    The Active Ragdoll system I use:
    https://github.com/hairibar/Hairibar.Ragdoll
     
  17. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Enemy AI: Breach & Clear

    Lately, I have been working on improving the enemy AI of Stealth Kill VR.

    The video below shows how the enemy communicate while breaching & clearing, whenever the player runs away.



    This is still WIP. I still need to adjust some things, like making the enemy move around their buddy instead of in line of fire.
     
  18. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Boss Battle: Attack Helicopter



    Lately been working on a boss battle against an Attack Helicopter. The video above shows the beginning of that battle.
    I'll have to tweak some stuff and balance the battle. When this is done, I'll release a test build of this encounter, in our discord server.
     
  19. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Machine gun mounted drones



    An early test of the drone enemy. These drones have mounted machine guns and will attack the player as soon as the player is spotted by the sensors of the drone.

    Still need to add in the communication module for the drones. I want the drones to alert the HQ and have all enemies approach the target location.
     
  20. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Rank System & Updated UI



    After each successful mission, the Operator will be evaluated on his Time, Accuracy and various mission related evaluation elements.
    Depending on the Operators skills they will be graded. The highest grade being S followed by A, B, C, D and E.

    The UI has also been improved in this update. What do you think?
     
  21. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Enemy AI: Getting knocked out



    If you beat the enemy enough he'll pass out and lie still for some time. After some time he'll wake up and try to understand what happened and start investigating.
    You can also beat the knocked out enemy to wake them up quicker.
     
  22. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    AI in Stealth Kill VR

    guards.jpg


    For the AI in Stealth Kill VR, I use a 'Finite-state machine'. Here is an example of the current behavior states of the Guards:

    states.jpg

    Each of these behavior states have a couple of inner states. For example, here are the inner states of the 'Investigate Lost Target' and 'Combat Tactical Buddies' states:

    states_combat_investigate.jpg

    To make it easier (and more structured) for me while developing the game; I have divided each behavior state into scripts that I can attach as GameObjects to the AI Agents in the game. This way I can easily add in new behaviors without complicating the code.

    go_states.png

    This also allows me to quickly create new enemy AIs by only combining the behaviors I need. Our gun drone isn't that sophisticated and only need a few behaviors to function:

    drone_states.png
     
  23. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    2 New behaviors added for the Guards


    The Guards will know react to spotting a friendly dead lying down. The guard will proceed to run towards the other guard and inspect. Depending on whether the lying guard is dead or knocked out, the standing guard will react accordingly, by either kicking or calling HQ.
     
  24. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Changed the whole VR interaction and physics system


    It has been a while since my last post. I've been working on changing the whole interaction and physics system. I'm now using HurricaneVR+Hexabody for the player and Puppetmaster for the AI.

    Check out the video for these systems in action.
    I'm pleased with the results. What do you guys think?
     
  25. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
  26. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Weapons so far in Game
    Testing out the weapons I have added so far into the game.

    I'm using HurricaneVR so adding weapons isn't time consuming.

    The challenge I had was making the heat smoke look realistic. Instead of using particle effect, I used a linerenderer to achieve this effect. What do you think?

     
  27. SkyYurt

    SkyYurt

    Joined:
    Dec 12, 2010
    Posts:
    234
    Night Mission