top of page

Sparrow

I wanted to create a Third Person experience inspired by Tomb Raider 2013 and  A 'Sense' Ability inspired by the Witcher Sense from The Witcher 3.

Project Details

  • Engine: Unreal Engine 4.27

  • Developed over 6 weeks halftime

  • Visual Scripting

  • Lighting

  • Level Design

  • Technical Level Design

  • ​Epic Games Assets:

    • Sparrow Character, Paragon by Epic Games

    • Orc Hammer by Bugrimov Maksim

    • Soul: Cave by Epic Games

    • InfinityBlade: Effects by Epic Games

    • Material Function Collection by Jakub Pander
       

Project Details

Sparrow: The Player Character

Sparrow.png

Inside the 'SparrowPlayerCharacter' blueprint I store the keybinds to the player's different abilities:

  • Interact with objects by pressing E

  • Sprint while holding Left Shift

  • Quick attack on Left Mouse Button

  • Aim while holding Right Mouse Button. If the player press Left Mouse button while aiming, Sparrow will charge up a stronger shot.

  • Activating the 'Sense' Ability while pressing Q

Level Flowchart

Level FlowChart

ScreenShot00032.png

The Entrance

ScreenShot00037.png

Hidden Passway

ScreenShot00033.png

The Bridge Room

ScreenShot00094.png

The Collapsed Tunnel

ScreenShot00036.png

The Cave Troll Hideout

The Entrance

The Entrance

ScreenShot00032.png

I wanted the player to get a good first impression of the level, so I created this cave tempel like entrance.

TheEntranceTopDown.png

The Entrance

Player Start

Blocking Rumbles

Destructable wall

1: The player start on a bridge with a single way forward and a clear view of the room.

2: The player reaches a point where a huge rumble blocks the path forward.

By using the sense ability, the player will get a hint as a clay wall lightens up, showing that it's of interest.

3: By shooting the clay wall, it gets destroyed and opens a new path for the player.

The Bridge Room

ScreenShot00033.png

and

The Hidden Pathway

The Bridge Room includes a rotating bridge. But the bridge's rails has been jammed so it can't rotate. The player needs to find the source and destroy it in order to progress forward into the level.

THeBrigeRoomTopDown02.png

The Bridge Room

The Hidden Pathway

The Entrance

The collapsed Tunnel

1: Approaching the Bridge room, the player will find a lever. But nothing happens if the player pulls it. Using the 'Sense' ability will highlight something that's just out of reach on the other side of the bridge.

2: I used the "Bait & Switch" technique. As the player turns around, a hidden pathway is revealed.

Walking through the hidden pathway leads the player to the bottom of the bridge room.

3: A ramp to the right of the player leads to a spot where the clay that jammed the bridge rail is fully revealed so the player can destroy it.

4: With the clay out of the way, the bridge now turns when the player pulls the lever.

5: After crossing the bridge, the player encounters a bonfire that's highlighted by the sense ability and is interactable.

Interacting with the bonfire ignites the player's next arrow.

6: Shooting the door with the ignited arrow destroys it so the player can pass through.

The Bridge Room

The Collapsed Tunnel

ScreenShot00094.png

The collapsed tunnel is a point of no return of the level. In the middle of the tunnel where the ceiling has collapsed, the only way over is by walking up on a wood beam so the player can jump over to the other side.
But once on the other side, there's no way climb back, which leads the player into the final room of the level.

The Collapsed Tunnel
The Cave Troll Hideout

The Cave Troll Hideout

ScreenShot00036.png

The final Area of the project.

All that the player has learned so far will be required to complete the puzzle that hides in the Cave Troll Hideout.

CaveTrollHideoutOverview02.png

The Cave Troll Hideout

End of the Level

1: When the player enters the room, there's another wooden door to the left.

Looking to the right, the player can spot another bonfire. But this one is surrounded by cave trolls.

2: There are a few vantage points for the player to engage in combat from. For instance, there is a hole in the wall where the player can get a clear shot on one of the patrolling cave trolls.

3: Regardless of tactic, the player has to defeat the three trolls in order to access the bonfire.

4: With the Cave Trolls defeated, the player can get over to the camp inside the hideout.

There is a bonfire and two crates that get highlighted when activating the 'sense'.

5: The player can't shoot an ignited arrow from the bonfire on the door, since there's a waterfall that smolders the arrow when it passes through.

6: And neither can the player leap to the other side without falling into the pond and smolder the arrow.

7: If the player ignites an arrow and shoots a crate in the camp, the crate starts to burn without getting destroyed. The Player can now ignite an arrow by interacting with the burning crate.

8: After exploring the room, the player will find out that there is a crate on the other side of the pond that can be shot and ignited through a hole in the wall.

9: The player can now go back to the door side of the pond and ignite an arrow from the crate.

The puzzle is solved and the player can ignite and destroy the door to complete the level.

the collapsed tunnel

The Witcher Sense Ability

ItnteractMaterial.png

The way I created the Witcher Sense Ability was to create a Emissive Material with a Fresnel Material Function to it, that gives a nice glowing edge around the mesh

When the Player presses Q to activate the 'Sense' ability, a parameter named Opacity in the material will ramp up from 0 to 1, making it visible with a smooth transition.

LevelBlueprintScreenshot.png

I also wanted to apply a range to this Sense ability, so inside the level blueprint I set a vector Parameter value of the Players location every frame when the ‘Sense’ is activated. I then use that value inside the Material to also set its opacity depending how far away the player is from the source.
 

I also wanted to apply a range to this Sense ability, so inside the level blueprint I set a vector Parameter value of the Players location every frame when the ‘Sense’ is activated. I then use that value inside the Material to also set its opacity depending how far away the player is from the source.
 

InteractObjectGlow.png
EnemyGlow.png
Script: The Witcher Sense Ability
Script: The Interactable Object

The Interactable Object Parent Blueprint

The Interactable Object Parent is basic blueprint actor that includes two static meshes. The Main and the Sensed Static Mesh.

On begin play I first set the Sensed Static Mesh to be the same as the Main Static Mesh. I then create a Dynamic Material Instance of the Interact Material and apply that to all the elemental indexes of the Sensed Static Mesh.

To make the object interactable, I created a Blueprint interface that i named Interact Interface. It’s inside the Interact Interface where I put the fuctions of the actor when the player interacts with it. When the player presses E, a linetrace will be drawn towards where the player is aiming. If that linetrace hits any actor with the Interact Interface, the fuction inside that perticular actor will be called and activated.

The last part of the script is where I bind events to the event dispatchers that the player sends out when the sense ability is activated or deactivated. The events plays a timeline that will make the Opacity parameter in the Interact material to go from 0 to 1 (See the Witcher Sense Ability above).

ScreenShot00065.png
Script: The Base NPC Class

The Base NPC Class

In the same way as the Interactable Object Parent, the Base NPC Class got two Skeletal Meshes, where one is called Sensed Skeletal Mesh. On Begin Play i set the Skeletal Mesh and Animation Blueprint Class of the Sensed Skeletal Mesh to be the same as the Main one. I then create a Dynamic Material Instance of the Enemy Material and apply it to all the elemental indexes of the Sensed Skeletal Mesh.

The magic with the Base NPC class is found within the Class details. I created numerous of public variables that will help me to easily create and define new NPCs:

  • Stats

    • Max Health: How much Health the NPC should have.

    • Attack Range: The distance the NPC should be able to attack from, mesured in Unreal Units (Centimeter).

    • Minimum / Maximum Attack Damage: Every time the NPC attack, a number between the min. Damage and max. Damage will be randomized and become the output damage.

    • Critical Hit Percent: After the output damage is generated, a number between 0 and 100 will be randomized. If this number is lower that the Critical Hit chance, the NPC will deal a critial hit which deals increased damage.

  • Patrol

    • Patrol Point: A separate blueprint actor that includes an array of vectors. All the patrol point actors that are placed in the world will show in this dropdown menu. The NPC will follow the path made in the Patrol Point selecter in this menu.
    • Patrol?: A Boolean that must be checked to true for the patrol function to work.

    • Patrol Looping: If checked to true, the NPC will repeat its patrol path. If not, the NPC will stand still when it has reached the end of it's patrol path.

  • Ranged / Melee Enemy:

    • Attack Anim Montage: A dropdown menu where you set which animation the NPC should have when it attacks.

    • Range Attack Projectile: A dropdown menu where you can choose which projectile the NPC should spawn.

    • Ranged?: A boolean that needs to be checked to true for the NPC to be able to spawn projectiles. If not, the NPC will default to meele attacks.

The values selected in the class details will be stored in the Enemy Ai Controller, that will use the values to navigate through its behaviour tree.

EnemyBT.png

Reflections

I first learned about Parent Blueprints in the introduction course in Scripting, as i overscoped a project trying to make a spell book with a lot of differend spells and abilities even though I wasn't that familiar with scripting at all. That specific project became nothing but a struggle, but didn't give up on learning how to make flexible Parent blueprints.

And here I am, about one year later, with two flexible Parent Blueprints that I'm really proud of! And it comes as a fine ending of my time at The Game Assembly, since this is something that i personally wanted to learn since early into the education.

 

I am really happy with the results!
I will come back and keep work on the Base NPC as a side project.

bottom of page