Summary

Like A Shadow is a stealth prototype I designed and scripted using Unreal Engine 4’s Blueprint-system. I used free assets but modelled using UE4’s geometry-system whenever possible.

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

  • Level Design

  • Unreal Engine 4 Stealth Project

  • Scripted using Blueprints

  • Modelled using geometry-tool

  • Enemy AI using Behavior Tree


scripting the game mechanics

Video of the old level

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.

Video of the old start and hook

I gave the enemies a katana to wield, because a weapon imminently registers that they are a threat and I felt it was a fitting weapon, considering the setting. Having them just punch the player would feel a bit silly and wouldn’t be as clear that they are dangerous. I also made them red, to make it even easier to understand that they are enemies.

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.

This project started with the player only having the ability to lure the guards to their location by calling out a distraction. 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 expanded on the player’s abilities as the project went on. I removed the ability to jump, and replaced it with vaulting/climbing over obstacles of a certain height. I also added a grapple hook, to give the project a unique selling point.

Having been inspired by Sekiro: Shadows Die Twice, I made it so the player needs to manually climb in mid air, if they didn’t land on their feet using the grapple hook. I felt this gave the game more agency and made the navigation more engaging. I also added a zoom to the player, so that they could inspect the upcoming area more easily.

I expanded on the player’s movement animations, by locking the camera to always be behind the player and finding animations for when they go in the 8-directions, forward left, backwards right and so on. I added walking too, so that the player had a bit more control when trying to find the perfect spot to grapple hook, not having to sprint everywhere.

I created an objective-system that updates when the player picks up the mission objective, which is the merchant’s katana in the narrative of the project. When this happens the active quest updates live so that the player sees that it is time to find a getaway, in the shape of a boat. 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 level

The Old Level

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 with gameplay in mind. A trading town felt like the right size for my project. When I later expanded on the player’s mechanics, I had to also expand on the map. I expanded greatly on the area outside the town, with some landmarks to make it easier to navigate. The previous level didn’t have much verticality and just felt very flat. I remade it from scratch and gave the level more life and unqiue areas.

The old town

Using fire and landmarks I try to guide the player through the level, so that they never feel lost. They should always feel that they’re making progress.

I start the level with easy obstacles to avoid, so the player knows what they’re capable of. climb a rock, duck under a obstacle, then vault another rock. After that I introduce the player to their first enemy, which the grapple up from after getting passed him. This way they don’t need to worry being seen from behind, when still getting used to the game. After that they encounter a guard with a small patrol-route. Here the player can use the “distraction-mechanic” to sneak past him.

After this are multiple guards the player needs to sneak past and they also get their first view of the town where the goal is.

The player will also see that there’s no easy way there because the bridge there is broken, so they will need to go around the river to get there.

Here I guide the player with light, a tori gate and a small shrine. After this comes the first real platforming challenge. At first there’s no way to lose by falling. The player can just move up and try again. But when they get to the cave, there’s spikes on the ground, so if the player falls they will need to restart. After this when they get out of the cave, I combine platforming and enemies, with the player having to platform on trees over guards. Now the player is by the town. I marked the their way in with a torch, but there’s enemies guarding the entrance. Here the player can use the distraction to get the guard under the way in to get away, but the player needs to time it well so the other guards don’t come to investigate too.

Inside the town the player can navigate over the guards patrolling the streets by grappling onto the houses. I tried to make the merchant’s house nicer that the rest of the houses, by giving him his own island. The bridge to his house is guarded by guards, but the player can get in by grappling on rocks sticking up from the lake. Inside the house, the player encounters a locked door. Searching the house they get to the merchant’s bedchamber, where he’s sleeping with the key to the locked door beside him. Unlock the door and there’s the katana which is the goal. Take it, go outside and take the boat.

I wanted this level to not be especially difficult, because the main goal was to showcase my scripting. But I still wanted to level to be able to properly show how the mechaics work and not just feel like a throwaway.

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 that has gotten 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 0, 1, 2, 0, 1, 2, or they could go 0, 1, 2, 1, 0. This forced the player to first spy and learn their patterns, because each is unique with different number of patrol points too.


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 AI and a unique mechanic with the grapple hook. I even recorded myself saying some lines to put into the game. The voice acting of the distraction and the guard saying “Must have been imagining things” are made by me.

Thieving as the main goal in games is something I think the gaming world should explore 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.