top of page

Salt & Ink

Unreal Engine 5
7 weeks

13 collaborators
Perforce manager
Programmer lead

UI

I tried to make the UI easy to alter since assets for the interface was delayed to the last day, and it also had to scale well since the original plan was to be able to recruit more soldiers at checkpoints.

The weapon, hp bar, ammo, ability, portrait is its own small widget and is created in the unit base. Each unit called the parent function to get their widgets. I used structs to set the artists textures and designers text. Due to the widget getting set by struct and also being very focused on a single task, it allowed easy and precise tooltips.

The unit widgets gets added to the viewport using delegate with interfaces and setting them as a children to a vertical box.

If time wasn't an issue I would had loved to add some more values to the tooltip, like damage and fire rate when hovering weapon, evasion rate and hp when hovering hp bar etc.

Concept.png

Artist sketch for UI.

UI.png

Final UI.

AbilityWidget.png

Click to enlarge

Base Classes

Base classes for enemies and units was designed to allow us to scale the game. We knew that the game would have many friendly and enemy units just like any RTS game.

The things we needed early on and that effected every unit / enemy was part of the bases. Things like cover, health with health bars, handle take damage / death, damage types and unit controllers. 

Overall it was fun to create the classes and it helped us getting something playable for our first build and made it possible to test the ability and skill systems much faster. It also allowed game designers and QA to develop their own fun systems based on mine and made it easier for me to help them out.


 

UnitBase.png

Unit Controls

Targeting was tough since we had a ability system with custom special attacks on all units so it was important to know who was selected for multiple reasons and to be able to select and de-select with precision.

I used mouse drag and box select. If you just clicked instead of dragging and didn't hold shift, It picked the first overlapping unit to avoid multi select when units got stacked.

It was also important to de-select with ease. Any left click would clear the current actor list before starting to add anew. I also added hotkeys 1-3 for each unit, and key 4 to select them all. H for hold positing and S would stop the current movement and attack anything in range.



 

Movement

Movement was done with Unreal AI pathfinding to navigate. When sending a movement destination, I would alter the vector with my formation system. It would spawn a Niagara and sound effect if the movement location was valid.

If the click location was invalid, the movement prompt would be ignored and give the player feedback with sound. If the click location was valid but the formation system had trouble finding a location due to things like narrow paths, it would just use the click location for all the units with invalid formation.

Targeting

Targeting and attacking was done by me and another programmer in my team. My focus was to get the targets while he programmed a chase function to get in range and reposition if the enemy was to far away.

If the player lacks a target while getting attacked, the attacker is set as the new target by the damage  delegate. If you complete or cancel a movement, the units will check the game instance for the closest enemy and attack if inside range. When right clicking an enemy, all the selected units will make that target their chase target and keep attacking. 

Cover System

The cover system was divided into two systems, one to handle UI by showing cover status, the other to handle the cover protection when damaged.

We wanted the covers to stay in effect even when flanked, but only towards the enemies that didn't have a clear line of sight. The player still had to know that the cover was compromised.

 

CheckForCover.png

Niagara VFX

Smoke and fire effect to show the player when the caravan health drops. The effects intensity increases as the health percents gets lower. To give a sense of urgency the smoke darkens at the lower percentage. When the caravan is destroyed the effect increase additionally. 


The effect updates every time the caravan gets damaged and when starting a new level since the HP was persistent between levels.

CaravanDamageEffect.png

Click to enlarge

Smoke.gif

The combat text was a bit rushed since it was low in our priorities. The damage value is added to a string array and the output of that array gets used to locate the index in a texture array, 0-9, where all the textures for the numbers are. If the string array length is above 1 it adds an offset to avoid stacking damage numbers.

The effect itself has a clamped random direction to make sure they all spread after spawning.

I used a damage type to know if the player was struck by a critical hit to spawn a different more colorful effect. If given the time I would make the effects look better and the critical hits more unique.

NumbEffect.gif
DamageText.png

Click to enlarge

bottom of page