Summary

One Man’s Treasue is Another Man’s Loot is a stealth-based game I scripted using Unreal Engine 4’s Blueprint-system. I used free assets when absolutely needed but modeled everything else using UE4’s geometry-system. I wrote a short story to fit the theme and environment of the game. For the enemies I used a behavior tree, with paths and AI that recognizes sight and hearing.

Specifications

  • Unreal Engine 4 Stealth Project

  • Scripted using Blueprints

  • Modeled using geometry-tool

  • Enemies using Behavior Tree


Designing A Pure stealth game

I wanted the player to not have any offensive abilities so that every enemy felt like a true threat. One hit from them, and you’re down. At least they only have melee-attacks, but they are faster than the player. The only way to get away from them is to break their line of sight and wait for them to go back to their patrol-route.

I gave the enemies a katana to wield, because a weapon imminently registers that they are a threat and it felt like a fitting weapon for them to use, considering the setting. Having them just punch the player would feel a bit silly and wouldn’t be as clear that they are dangerous.

Player Blueprint

Balancing is always hard when it comes to stealth-games. You don’t want it to be frustratingly hard but at the same time you don’t want the players to just breeze through without a care in the world. Adjusting the guards’ stats took some time, but I think they ended up being a fair challenge.

The only ability the player has is to lure the guards to their location by whispering out “hey”. The guards in range of the sound will investigate the location and this will break them from their patrol, making it easier for the player to sneak by undetected. Using free animation-assets I scripted so that the enemy does an animation when attacking and enabled a smooth crouch for the player to be able to sneak behind lower obstacles without being detected by the enemies.

I created an objective-system that updates when the player picks up the mission objective. When this happens the active quest updates live so that the player sees that it is time to find a getaway. I also created multiple types of doors for the player to interact with. One that simply can’t be open, one that opens normally and one that requires a key to open.


Designing The Merchant’s Town

I wanted the town to feel like a real place. I’m a fan of Japanese culture and felt like that setting would fit my narrative. There are very few pure stealth games that use the setting of feudal Japan, so I thought that would be something fun to build. I looked at references on old Japanese villages and towns and tried to emulate it. A trading town felt like the right size for my project without it feeling too small or too big. Having it be too small would question why someone would even try to steal something there, and having it be too big would result in it just feeling empty and deserted.

I built a part of the town closed by a second wall, leading to the mayor’s manor, that is can’t be accessed by the player. This expanded the town and gave it a nice backdrop. Having it take place in Japan also made it natural for the surrounding area to be mountainous, avoiding a flat and boring environment around the town.

Making it a trading town makes it feel natural for there being something worth stealing for a thief and it leaves room to write a fun story for the player to experience. The story I wrote was a bit of a beginning chapter in the life of a thief who is down on his luck. He hears about a merchant getting their hands on a katana previously owned by a famous samurai and the thief thinks that stealing it would be the perfect start to his career as a master thief. 


Quests and scripts

I wanted to challenge myself and try to learn new things while developing this project. I created a full menu and cinematic scrolling text explaining the story. But the thing I’m most proud of is the AI I managed to script. It has priorities, routes and actually feel like a real threat. They register both sight and hearing, investigating both, with sight being the priority of course. The balancing took some time, but I think they ended up being a fair challenge. When they hear a sound they walk to the source and investigate. After a short delay they say “Must be my imagination” and go back to their route. If they spot the player they run for them directly, with the only escape being to break their line of sight and wait for them to give up. If the player is caught, the level will simply restart and all progress will be erased.

Patrol Points

Being able to freely design each individual enemy’s patrol route made them feel varied makes it a requirement to study the environment for the most optimal path to go forward. The player can’t just run around after they’ve seen one enemy and learned a clear movement-pattern. I can change if their routes would loop between points or go back the way they come from.

What I mean with this is that I could decide if they would patrol between points 1, 2, 3, 1, 2, 3 or they could go 1, 2, 3, 2, 1. This forced the player to first spy and learn their patterns, because each is unique with different number of patrol points too.

Enemy Blueprint

AI Blueprint

Enemy Behavior Tree

Enemy Behavior Tree

Final Thoughts

I learned a lot doing this project. It was fun to try my hand at making my own little stealth project, with an enemy that has real AI. I even recorded myself saying some lines to put into the game. The voice acting of the characters in the game is me.

I would like to expand on this project in the future with tools for the player to use and more advanced AI or different enemy types that registers more sounds for them to investigate. Thieving as the main thing in games is something I think would be fun if explored more. There’s a lot to draw inspiration from and it creates an interesting dynamic where the player is severely underpowered compared to the enemies, with only their wits to overcome the challenges that faces them.

Chase.jpg