Alexander Reuter
Alien Appetite was our fourth game project at Futuregames. It was made in collaboration between artists and programmers in Malmö. For this project we got two reference games handed to us before the start of the project. Our reference games was Helldivers & Deep Rock Galactic.
In Alien Appetite you play as a chef infiltrating a alien ship. Your objective is to steal three large delicious eggs and get out of there. If you can, gather as many smaller eggs as possible to boost your score.
For this project I was also the product owner.
The main responsibility I had for this project was making the enemies and their behaviour.
Enemy structure:
The game features mainly two different types of enemies. One melee enemy and one ranged enemy. To structure the enemy logic I first made a enemy base class in c++. Here I put the logic that's necessary for all the enemies. For example such as a health component, damage, attack range, speed, etc.
After this I also made a Enemy Blueprint base class that inherits from the Enemy in c++. This way I'm also able to add logic that applies to all enemies in blueprint. This is convenient for small simple tasks, such as playing sounds, spawning drops and so on.
Then I had two separate blueprint that inherited from the base enemy blueprint class. One melee enemy and one ranged enemy. Here I could put logic that's only applied to that specific enemy. The reason I didn't need to make any melee and ranged separate classes in c++ was because I decided to do a lot of the enemy specific logic through behaviour tree tasks. That way I could do still add ranged/melee specific logic in c++ even with only having one enemy class in c++.
Enemy manager:
To manage the enemies in relation to the game I made a enemy manager which every enemy had a reference to. Through the game manager I kept track of data relevant to other game systems. Such as total killed enemies, number of alive enemies, kill streak etc.
For this project I used to AI tools provided by unreal to manage the enemy behaviours. The tools I used was AI controller, AI Perception component, Behaviour trees and Blackboard.
Above is a small mind map describing how I structured the AI. I used one AI controller for all enemies which I used for two main purposes. The first thing is a type check to determine which behaviour tree to run. The other is AI perception to update the blackboard variables TargetActor and LastKnownLocation.
After that the rest of the logic is done in the behavior trees, one for the melee type and one for the ranged type. Here's an image of the ranged behavior tree as an example:
As you can tell by the image the logic is quite simple. First there's a check if the enemy should attack, if the attack requirements aren't met it moves on to chasing the player.
In the chase section it'll first check if it should go towards the player, after that it'll check if there's a LastKnownLocation set, and if not, it moves on to the patrol section.
In the patrol section the goes to around in random locations in a
designated area.
I also made the Health system we used for this project. It was made using a UActorComponent which we could attach to both the enemies and the player.
In the component I used blueprint exposed delegates to be callable in blueprints. This makes it very easy to add simple logic when the delegates gets broadcasted.
Artists:
Programmers:
Enemy detection area:
Example of delegate use case:
Copyright © All Rights Reserved