Game Project 2
Genre:
Engine:
Language(s):
Platform(s):
Duration:
Team size:
Action, FPS
Unreal
Blueprints, C++
PC, PS5
9 weeks
16
TECHNOMANIA is a chaotic first person looter shooter where you play as a killer robot gone rogue inside a huge weapons R&D facility. Featuring advanced movement and a modular weapon system with hundreds of possible combinations.
My focus during this game project was the enemies. I made them move, shoot and die using Unreal’s behavior trees.
I also had a big focus on making it feel good.
I also created an enemy manager subsystem to control the enemies and flow of combat, as well as tools for building combat encounters.
Trailer for TECHNOMANIA, made by Philip Olsén
This was the first time I worked on enemy behavior, so much of the time in the beginning was spent just learning the tools and workflow.
But I eventually got the hang of things.
The finished game has three types of enemies; soldiers, drones and turrets. We planned from the beginning to have a bossfight against a tank,
but had to scrap it since neither me nor the artists had time to work on it.
Fighting soldiers
The most common, and most complex enemy. The soldiers are equipped with the same modular weapons the player uses making them highly unpredictable.
Their AI works by moving toward the player. And if they have line of sight and are within range, attack.
If the player comes too close they will attempt to run away.
And if they take enough damage they enter a fleeing state where they attempt to take cover, where they will heal.
I used Unreal’s environment queries to find positions at the right range where they can see the player, and to find hiding spots.
The soldiers will also vocalize depending on their situation, making them feel more alive.
The drones are much less complex than the soldiers. They fly toward the player until they are within a certain distance while shooting if close enough.
And if the player starts getting too close, they attempt to fly backwards away from the player. They also tilt slightly in the direction they are moving.
One problem I faced was that Unreal has no built-in system for pathfinding in 3D.
(This inspired my specialization.)
I didn’t implement any proper pathfinding.
Instead the drones attempt to stay a certain height above the player, or the ground whichever is highest.
This made them able to avoid obstacles and follow the player through our relatively open levels.
It also gave a very convincing feeling of them trying to avoid the player, while not actually staying out of harms way.
Fighting a group of drones
A turret mounted on a rock
The turrets are very simple. If they have line of sight with the player they will turn toward it. And if the angle to the player is within a certain threshold, they will shoot.
The biggest challenge was making them rotate smoothly in the right direction, which I solved with some math.
To support the power fantasy of the game the enemies needed to not be too powerful. The player had to be able to dodge the hitscan attacks somehow.
My solution to this was making the enemies aim at the player’s position, subtracted by the player's velocity multiplied by an accuracy value.
This gave the feeling of them shooting where the player stood just a moment ago, which was very satisfying while promoting fast player movement.
Dodging bullets
Close up of a soldier
The enemy manager subsystem was a big part of my enemy system. It kept track of combat,
spawning new waves when needed and unlocking the arena when the fight was finished.
I also implemented the attack token system from DOOM. This made it so only a limited number of enemies could attack at the same time.
It was a very bare bones implementation, but it worked well enough.
We wanted arena based combat, with multiple waves of enemies. To allow the designers to create that kind of combat in the editor I created the spawners.
Originally intended to just spawn enemies, they became the platform for building combat encounters.
Connected to a combat object they are assigned waves, with enemy type, amount and delays.
This data is then sent to the enemy manager when the combat object is triggered, by an enemy noticing the player or a trigger.
You entered the wrong neighborhood buddy