Unity Update: Sneaking Mission Anxiety

Well, its finally done(ish) and out there. Check this article for a link and my thoughts on finishing this crazy game. The TL;DR version is at the bottom.

Game Objective:

Guard: It is your job to catch the robber. When you are close enough to the robber you are able to begin handcuffing them. When they are handcuffed you win.

Robber: It is your job to steal the blue cubes. When you have stolen a cube you must secure it by dropping it off at the back any truck located outside. When you’ve secured at least 4 you can drive the truck away to win.

-          Usual FPS controls, WASD will move you while you use the Mouse to move around
-          When you’re close enough to an object you can interact with it with the Left or Right mouse button
-          Holding Shift will allow you to run. You make noise when you run.
-          Robber Only: Q & E will allow you to lean in either direction to look around corners
-          Robber Only: C will allow you to crouch, you can enter vents only when crouching

Link to Game: http://db.tt/YbQfzYHS

     Looking back on the creation of Sneak I’m glad it’s finally done with. Even after complaining about the game on the podcast I’m actually amazed that I got it to a point where I could say I’m done. [TL;DR at the bottom]

     Sneak is a 1v1 game where one player is a guard and the other is a robber. The robber must steal at least 4 items, get back to a truck, load up the items, and use it to get away. When I first started this project I had a very grandiose vision on what I could do on my own. Eventually I had to scale it down to what I have now. In terms of game mechanics: everything I wanted to get working is working; however, there are some systems in the game that could have been made less awkwardly now that I think about it. The one that stands out the most to me is my run/stamina system. I wanted the player to run slower if their stamina was lower.  In the game right now the stamina system is shown as a percentage. Looking back on it now it would’ve been far easier and more intuitive to make your running speed something like:

If you’re holding down the run button:

Move Speed = Base move Speed + (Stamina Percentage x Max Speed Boost)

     But it seems like I was in a strange state of mind when I initially wrote the move speed system because right now the stamina percentage is calculated on a scale from 200 to 500 instead of 0 to 100. This resulted in me going in some weird and crazy direction where you take a percentage of that number and add it to your overall speed in some strange fashion.

     My biggest misstep though is that you need to have two computers to play this game properly. In addition, based on what I’ve heard about the default Unity networking setup, NAT issues are apparently going to be a pain to deal with. I think that next time I’ll go for either a single player game or local co-op/vs. Also network based bug fixing was one of the biggest stumbling blocks I had to go through for this game. Things not syncing properly and getting things to happen on both clients, or one client and not the other were very real problems I had. Initially I had tables in the game that you could move around to create obstacles, but sometimes lag would mess these up and have them in slightly different positions on each client or even get them embed in walls. This was a really big problem because jumping isn’t enabled in this game and getting a piece of furniture stuck somewhere critical would clearly be gamebreaking.

     The final map itself was reached after scrapping three other fully laid out maps, and several layouts that never made it into unity. Firstly I want to get it out of the way and state that making the art assets for these levels was the biggest pain for me. That is mostly because I am not good at art and that I cannot 3d model. The laying out and planning was great though. In my opinion, a stealth based game is very driven by its map layout. Since Sneak is a cat and mouse type game I had to think about what would be fair for each player.

    The blue gems that the robber has to steal are semi randomly placed around the building. 1 will always spawn in the dead end room. This is just so that the robber will 100%, after figuring out the map, know where at least one of the objects is. The 5 other jewels that will appear on the map are placed there by randomly selecting a location from 5 “jewel groups”. For example, in the cubicle area there are 4 offices closed off by doors. The 4 offices are 1 jewel group. A jewel will always spawn inside one of those offices. I thought the jewel group idea was good because it would give experienced players an idea of where they need to check but not knowing exactly where they need to check. Going with that same general idea, all but 3 interior doors will spawn in a random state of locked or unlocked. At first every single door was locked, but this made it very hard for the robber to get around since unlocking a door takes time. It can also easily change how the robber might tackle the jewel stealing situation depending on what is and isn’t easy to steal.

     In addition, the robber also has an exclusive mode of transport with the vent system. The vent system was initially only made to connect the 2 file rooms. I played around with the idea of the vents dropping into every room but I thought that would make it too hard on the guard. I also thought about making the vents exit out onto the roof but that would lead to escaping being too easy. Instead, I settled on the vents being an alternate form of transport between the two wings of the building. For the guard, if you hang around the corner of the building closest to the robber’s spawn point you can monitor all the exits of the building. I set it up this way so that, if it’s going bad for a guard this is their “last stand” and an attempt for them to catch the robber one last time.

     All in all Sneak was a very interesting and overall fun experience. I went overtime with this project which is something that bummed me out quite a bit but it made me once again realize/remember how time consuming it is for me to make the visual assets for the game. It also helped me better imagine how to allocate time towards whatever tasks I need to do for my next project(s). Lastly, it blows my mind how small the final webplayer build for this game is. The fact that it’s just under 3 Mb is blowing my mind, a sub folder in the asset folder I have for this game is bigger than that. I do assume though that a lot of the game is held up by the unity player backend though.

     I think that after I finish working on something else I'll come back to this game and throw in some updates. Maybe get a second map up and running too.

-          Making Game = fun
-          Making Textures = not so fun
-          Building Networking = Cool
-          Making it Networking Only = not so cool
-          Next game def. single player or local multiplayer