Star Wars Project
Third Person Action | Tech Design | Level Design
Idea
I love Battlefront 2 and was inspired to create my own project with a few mechanics from the game. I chose to explore Cad Bane, a fascinating character in the Star Wars universe, as his role as a bounty hunter allowed me to craft a unique scenario.
Specifications
Engine/Tools: Unreal Engine 5, Blender, Unreal Scripting, Advanced Locomotion System (ALS), Cad Bane Model.
Genre: Third Person Perspective Shooter
Reference game(s): Star Wars: Battlefront 2 (2017)
Gameplay Mechanics
Overheating
In Battlefront 2, there's no limited ammo; instead, a mechanic causes weapons to overheat at 100% and disables shooting. During the cool down period, players can press "R" . Failing extends the cooldown, and shooting is still disabled until it reaches 0%.
"R" can be pressed anytime with <100% for regular cool down.
Quickdraw
Inspired by both Red Dead’s Dead Eye and Overwatch 2's Cole Cassidy Utlimate, pressing "E" marks visible enemies.
Slowmotion and Vignette effect are added as simple feedback throughout this ability.
Use "Left Mouse button" during the ability to execute them individually, cancel with "E" if ability is active.
It aligns with Cad Bane's cowboy theme.
Rocket Boots
This buff allows the player to jump twice, however the second jump gives extra velocity. It wasn’t as obvious as I would imagine since I use ALS but it works as intended. I had to adapt my scripts to the system.
Tech Design
Overheating
This mechanic functions like a reversed stamina bar, depleting if the player isn't shooting with >0%.
While in use, it adds heat and halts the draining process. Hitting 100% triggers an instant cooldown minigame, hitting reload button within the blue bar instantly cools down the weapon, hitting reload button within the yellow bar buffs the weapon, making the player able to shoot without adding heat for a short period.
The player may also wait out the cooldown, however pressing the reload button outside of the blue bar will start over the cooldown process and take longer before player can shoot.
The design is modular, enabling easy modification outside the script. Users can adjust variables like heat increase, drain speed, and delay duration.
Minigame threshold is customizable with min and max variables, and visuals update automatically through the widget function.
Instant cooldown
Modular variables
The variables for instant cooldown and the buff are modular - the user can either make it easier or harder for the player to hit instant cooldown, same goes for the buff.
And as we can see these variables also update without having to access the UI making it much easier to customize or even debug.
I used floats to make more precise percentages, for example 1.0 = 100%, 0.5 = 50% and so on.
Quickdraw with cooldown
This mechanic was the most challenging to create. After several failed attempts, I found success with a single line trace and looping until all visible enemies were hit and added to an array as well as their mesh into a seperate array, hence the red material applied on enemies.
The function scans all existing enemies on a level, shoots a line trace toward each and adds hit enemies to an array with assigned indices. mesh with the same index in its own array is attached to marked enemies. Enemies behind cover and enemies not on screen aren't added.
The loop continues until all enemies have been scanned. Once completed both arrays are sorted according to distance in new arrays - closest to the player character gets index 0, second closest gets index 1 etc. Old arrays are cleared.
During ability execution, we check for index 0 in the new mesh array, remove it as well as the highlight effect, kill the enemy, remove index 0 from the new enemy array and loop back to the start.
This loop is dynamic thanks to Unreal Engine’s system; removing index 0 shifts others down, ensuring index 0 always exists. The function repeats until index 0 in the new mesh array is gone.
Cooldown material
Battlefront 2 has a radial cooldown in their game so to stay true to the reference I had add it to my project as well.
However since Unreal do not have a radial progressbar I had to make my own yet simple material blueprinting.
With a parameter we can easily access this in the UI and update the radial effect with an event tick.
Furthermore, a progressbar in a UI/widget has its own “Set Percent” and since this isn’t a progressbar on its own I had to make a custom made function that operates the same.
Buff
Camera
The camera in ALS extremely different from what you work with in regular TPP-projects in Unreal Engine. Instead of just being a camera component inside the character BP it has its own animation blueprint with tons of settings. From different curves and floats depending on character pose, such as running, walking, crouching and so on.
The default ALS has a lag built in that makes “smoother” camera movement and this one was a bit annoying, especially when sprint-jumping while shooting, it was hard to know where you aimed so I made it less laggy by tweaking a few float values.
Process
Trello
Trello is an amazing tool that I've used since I started studying LD.
I create my own tasks to keep track of what needs to be done, tasks that are done, add checkmarks as subtasks, add comments to remind myself of existing bugs or problems I've encountered and how I solved them.
It is a perfect way to break down big item into small fragments and get an overview of the whole project.
Pureref
Pureref is let’s me create a custom sized moodboard allowing me to add multiple images that I believe fits the project’s theme.
Blender
We can’t do a Cad Bane project without a model of course, so I did some searching and found the perfect one that included his blaster, textures for the player model and his blaster followed.
However the model wasn’t rigged, I had to learn Blender, furthermore learn how to rig as well as weightblend.
I had a lot of issues where the model would stretch however UE’s retargeting function worked perfectly for ALS.