Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[stealth meets strategy] Safe Not Safe

Discussion in 'Works In Progress - Archive' started by Wiseman17, Jun 24, 2015.

?

Which side you like more?

  1. Security Expert

    2 vote(s)
    28.6%
  2. Burglar

    5 vote(s)
    71.4%
  1. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    Safe Not Safe is a multiplayer game about reaching and cracking a safe in a hazardous environment as a Burglar and about creating such hazardous environments for others as a Security Expert.


    Security Expert

    As a security expert you are getting your very own randomly generated security base in a slightly run-down condition.

    Your goals are:

    • hide the safe containing precious materials somewhere on the base’s territory.
    • arrange the lights, sensors, turrets, cameras, bots and other security devices in a way which is preventing other players, playing as burglars from getting to the safe… or getting out with it’s contents.
    • security devices are highly tweakable and can communicate with each other so you can combine them in a plenty of ways.
    • every attack on the security base is recorded and available for review any time. Fine tune your security devices, lure the intruders into deadly traps and practice your evil laugh while waiting for new burglars daring to challenge you.



    Burglar

    As you may already have guessed, playing as burglar you should infiltrate a security base, locate and open the safe and get away with it’s content. These missions will be presented as full-featured action-stealth game inspired by Thief, Deus Ex and Splinter Cell series.

    • real challenge - you should crack the level which was not designed with your success in mind. On the contrary, it was designed to crack you.
    • role-playing elements - choose from one of the 3 main classes or just combine the skills which suite your style. Upgrade your skills and strategy accordingly:
    • Commando - extensive firepower, explosives and combat augmentations.
    • Ninja - acrobatics, infiltration augmentations and stealth.
    • Hacker - drones, hacking augmentations and… also stealth!



    The game

    Genre of the whole game is hard to pinpoint, some kind of “turn-based multiplayer strategy with a taste of tower defence vs stealth action”. Security Expert and Burglar are taking turns at trying to make the base impenetrable or breaching its defences. A few more bullet points on the planned features:

    • Both Security Expert and Burglar will be constrained by virtual money, that they will spend on the security devices or equipment and will earn by being successful at their tasks.
    • There will be a global list of user-created security bases and burglars would be free to choose one for their liking, but...
    • A burglar will have only one shot at trying to crack any new version of any base. Next attempt is given only after the base is updated by an expert.
    • More to it a burglar will most likely have a time limit (e.g. 10 minutes) to complete the mission in order to balance the game for security expert’s favor.
    • Each base and each burglar has their own ratings and success or failure on each mission influences both ratings at once (plus to one, minus to the other, naturally).
    • ...much much more to tell here, we will continue with details (and screenshots, and videos, of course) in upcoming updates. If you are interested, please visit our website http://safenotsafe.com to learn more about the game, signup for a newsletter or even become a tester of the upcoming development builds!
     
    Last edited: Jul 7, 2015
  2. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    copied from our DevLog on TIGSource
    "Safe Not Safe" stealth system

    We'd like to share our approach to creating a stealth system for our upcoming game.
    Here are the basic details of it's "visual" part.
    Will come to sound part sometime later.

    Burglar's visibility.

    Burglar's visibility rate is a value which shows how easy it is for an enemy to see the Burglar.
    Counted on a scale from 1 to 100.
    It's a dynamic value and current visibility rate is always affected by:
    • Posture
    • Movement speed
    • Size of a weapon/device in hands (not yet implemented)
    • Lights
    Posture and movement speed
    That's basic, but still not any stealth game takes even that right. Even from far distance quick movement is quite noticeable.

    Size of a weapon in hands
    I liked this feature a lot in the Thief series (1 & 2). You could only be (almost) safe from detection only by being empty-handed or holding a blacjack (which is small and black). Looks strange (and unfair) when a sneaking guy is pulling a huge sword or a crossbow while staying several meters from a guard and stays unnoticed.

    Lights
    I've tried to be thorough here, so EVERY light on the scene which will "touch" the Burglar will affect his visibility. Positions of most of the lights will be affected by Security Expert, so correct lights setup going to be vital. The Security Base going to be quite small, and some default lights would be already in place, so it's not going to be too monotonous.

    Lights of course are giving huge boost to the Burglars visibility and the amount of this boost depends on how much of the Burglar's body is lit. It is counted by raycasting from a lightsource to 3 points on the Burglar's body. Feet, Hips and Head. See the screenshot:
    In the case on the screenshot (only feet and hips are lit) the light will give 66% boost of it's full "magnitude" to the visibility rate. Unity is so flexible, that we can take the value of light's magnitude and it's spot angle right from the light source itself, so while balancing the stealth part we will see how those parameters are changing without looking anywhere else (The brighther the light, the more it will affect visibility. Ahd the width of the cone of a spotlight will be immediately obvious and honestly counted by the model.

    Of course light's boost to the visibilty decreases as well with distance completely disappearing after the effective distance (which is also taken from the Unity object) is reached.

    Detection by enemies.

    Detection rate is a value which affects the speed of Burglar's detection by enemies. If it is big the Burglar is detected fast, if it is small the Burglar is detected slowly.
    It is affected by:

    • Burglar's visibility rate (see above)
    • Distance to Burglar
    • How much the Burglar is exposed to the enemy
    Burglar's visibility rate
    Obviously directly corellate with the Detection Rate.

    Distance to Burglar
    For ease of parametrizing it is counted on a scale from 1 to 100, where 100 - means distance to Burglar equals to maximum effective range of an enemy's vision (say 25m) and 0 - means Burglar is on shortest possible distance to an enemy.

    The distance should be obviously in inverse correlation with the Detection Rate. The farther Burglar is (bigger the distance) the lower Detection Rate should be.

    Burglar's exposure
    Much like exposure to light, this parameter is counted by raycasting from enemy's "camera" to the same 3 points on the Burglar's body.
    So on the following screenshots:




    it equals to 100%, 33% and 0 respectively.

    Counting Detection Rate
    After getting all this straight, we can see, that counting Detection Rate is quite an easy task.
    We know that it directly corellates with the Visibility Rate and inversly corellates with the Distance. We only need to find a coefficient for that relation.
    Below is my example table which helps in counting the exact value of the coefficient which is named DRIncreasePF (Detection Rate Increase Per Frame).

    We are using "Boundary Conditions" approach here (not sure if it the correct math term, additional hint: it is a basic way to find "k" in a x = ky equation).



    X axis is the Distance
    Y axis is the Visibility Rate
    And the values inside are examples of seconds which we want to pass until the Burglar is detected.

    Using this table and a bit of Excel magic I came up with a value for DRIncreasePF around 2.5 The value is still tweaked in the field experiments of course, but it gives quite nice results for my taste. You can measure this Detection Rate effect by a color of detection markers on the screenshots. When they are fully orange Detection Rate is 100, when they are white it is near 0.



    Conclusion
    So this is our stealth system as it is implemented so far.
    I hope someone will find this post useful and/or interesting.

    Feel free to comment here, or anywhere and find more about Safe Not Safe game
    on it's website: http://safenotsafe.com.
     
  3. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    Our first video! Concept explained in more details. Implemented stealth model and programmable robots in action :)

     
  4. 1Piotrek1

    1Piotrek1

    Joined:
    Mar 14, 2014
    Posts:
    130
    I like your idea for gameplay, but i think that environment should be more closed (something like dungeons or Portal laboratory). I think also that security expert should have top down / isometric perspective.
    You should also change player model to something unknown. If you need ready to use (and edit in blender) human models check out Make a Human program.
     
  5. TheDarkBadger

    TheDarkBadger

    Joined:
    Feb 7, 2015
    Posts:
    27
    Really cool idea! Good luck!
    I skim read through your second post (its 11:17pm, not exactly up for reading of a pure white back ground right now XD ) and it seems like your using a lot of Raycasts. Off course use them when needed, but keep it to a minimum, Raycasts are NOT performance friendly in large amounts.
    Anyway, once again, good luck!
     
  6. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    Thanks for your feedback, 1Piotrek1 and TheDarkBadger.

    @1Piotrek1 :
    I agree with you about "closed" environment. If you've seen the fence in the demo video, it's an approximate limit for the territory. It may become smaller since it should be interesting to defend it too :) But it should not be too small, since we'd like it to be a "complete level" experience for the burglar. Giving approx 5-7-10 minutes of gameplay trying to breach the security and find the safe and get away. Also we hope to reach this "sandbox" feeling, when you have a new security base, you choose your ways of approach, trying to scout the devices and finding the best way in. Not unlike like Outposts in Farcry 3 and 4.

    About the isometric perspective - yes, I'm still in doubt here too... From one side it might make the deployment of devices much faster and give better whole overview, but at the same time this approach may make it harder to work in 3d world (imagine you want to put a lamp, or movement detector on the ceiling of a room on the second floor :) ) and also can make it harder to understand if the device will detect someone or something without making too much movements with the camera... May be we'll go with both view modes at once... if we'll have enough time :) By the way, interesting to know - which side you like best? Which side you would have tried first?

    Good hint about MakeHuman, thanks, I'll take a look. I've not bothered with that for a prototype, but those ready-made guys will go away for sure.

    @TheDarkBadger :
    Thanks for your hint about Raycasts, I do agree with you. I'm trying to use them only *after* checks for a Distance and a Cone of vision(light).
     
  7. 1Piotrek1

    1Piotrek1

    Joined:
    Mar 14, 2014
    Posts:
    130
    Ghost camera with really smooth collision detection will be also great. You should use projectors or colored lights instead this flashlights for robots. Outlast like camera effects for burglar will also improve visuals.
    I'm not big fan of strategy games, so I would play as security expert only if he must place all robots/cameras/turrets in small amount of time or in real time.
    Did you already created multiplayer functionality? It would be very difficult to add it in future.
     
  8. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    1Piotrek1, thanks for additional hints :) True, many things remain to be done and polished!
    Regarding the multiplayer - my idea is the following:

    • Player A is an Expert - he is setting up the Security Base and when everything is ready - uploading it to our server.
    • Player B is a Burglar - he is choosing from Security Bases one and tries to break it. According to results virtual money and ratings are spread between players A and B.
    • Player A can see the replay of player's B attack and tweak his defences if anything is wrong...
    • Player B can not attack the same Security Base again until something is changed there by the player A...
    Something in that direction... but details will be tweaked on the fly of course.
     
  9. 1Piotrek1

    1Piotrek1

    Joined:
    Mar 14, 2014
    Posts:
    130
    I meant that are you using network view, rpc and other stuff like that in game?
     
  10. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    1Piotrek1, thanks for explanation. No we didn't yet come to that stage, but I've tried to explain by my previous post, that our multiplayer is more or less asynchronous. Basically, we want to synchronize only map files (experts to burglars) and replay files (burglars to experts) and of course synchronize statistics, money etc. with the main server. Do you still think it may become more difficult in the future? Why if yes?
    Of course we realize it's one of the bottlenecks and we are working in that direction already - especially we are concerned about the replays feature...
     
  11. 1Piotrek1

    1Piotrek1

    Joined:
    Mar 14, 2014
    Posts:
    130
    Recording films is very bad idea.
    Instead of sendind player position and animation (5 ints) you want to send big arrays (around 1 000 000 color values for hd). You should start from PUN tutorials, create your own player controller with values synch, and then try to connect it with your gameplay idea.
     
  12. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    1Piotrek1, not films of course. We are thinking more in that direction: https://www.assetstore.unity3d.com/en/#!/content/690
    Recording positions of objects and their bones we are interested in with some certain rate and then replaying it with varied speed, from any point, allowing multicam etc...

    But good idea to start looking at PUN, thanks.
     
  13. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    copied from our DevLog on TIGSource
    Tweaking and programming devices

    The joy of the Security Expert and the pain of the Burglar are the Security Devices.

    They will come in big variety and one of the most interesting (hopefully) part about them all is an ability to combine devices together and create previously unknown, creative lines of defence.

    Simple and widely used example - a security camera is calling for mobile guards when spotting an intruder... that’s obvious. But how about that: if a camera spots something suspicious, but not yet sure it is the enemy - it is able to turn on a spotlight (or just signals already working one which otherwise is just routinely sweeping some sector) and “ask” it to light up the spot it is interested in. Or a movement sensor in a room which is locking a door behind a naive burglar and opening another door to a room full of… whatever nastiness you want.

    These 2 examples are just from the top of one's head, We are sure community is able to come up with something we can’t even dream about. So what we are trying to do now is to implement a system which will give an ability to a Security Expert do all that and will not overwhelm him at the same time. Another consideration - Burglar should have a way to prevent some of those unpleasantries from happening… but more about that in the following updates.

    Basic idea for now is the following. Any device has 4 possible modes: : “Idle“, “Alerted“, “Enemy Spotted“ and “Signals“. A mode is a simple list of actions which the device should execute repedeatly while being in this mode. A device can be only in 1 mode at a time.
    Modes are not equal, some are more important than the others (one may take priority over the other). See the image below (clickable):

    For example: when a robot is patrolling the territory in “Idle” mode it is executing actions listed for that mode (Goto, turn, wait etc.) When it hears something suspicious it switches to the “Alerted” mode immediately and stays there until asked otherwise. Same happens if it notices the enemy - “Alerted” mode is forgotten and “Enemy Spotted” mode is active. If a player is lost - “Alerted” mode again. Etc etc.

    “Signals” mode is special. It will be used for organizing that very devices combinations I’ve mentioned. Some aspects of this mode are still raw, but still, it is supposed to have the same “lists” of signals, only more than one - one for each “Signal” we want this device to understand. So, let’s say a spotlight has “Suspicious activity” signal configured, and upon receiving it, it should point the light to a position carried by the signal if able. Same with the door, which is able to be locked or opened by different devices depending on the configuration.

    Just to make it a bit more understandable, here is a screenshot showing a guards modes configuration screen.


    This is the gist of the idea. We are interested to know, how hard you find this post to understand and in any other sorts of feedback, of course!
     
  14. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    New video post.

    In this early prototype we are focusing on Stealth and Hacking approach and hope to demonstrate a few interesting mechanics the player would be able to use.

     
  15. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24
    First playable prototype released!
    Mostly a gameplay part for the hacker class, but enough toys to play around and get a first feel of the game.

    Please check it out on https://wiseman.itch.io/safe-not-safe

    Any feedback is welcome, here or wherever else you find it comfortable...
     
  16. Wiseman17

    Wiseman17

    Joined:
    Aug 17, 2013
    Posts:
    24