Flora
A downloadable game for Windows
The Game
Flora is a 3rd-person game made with UE5, where you take on the role of the Florist and must battle enchanted flowers in order to harvest their blooms for your bouquets.
The Code
Below is an example of some of the code for the random encounters and combat AI. If you'd like to see more, you can view the current Github repository here.
Enemy Types
At the start of combat, enemy combatants are spawned and assigned a type from the internal list of Enemy Data Assets. Creating each type as a data asset can be easily done within the editor, making it quick and easy to add new enemy types or tweak the values of existing types.
Combat AI
Enemy decision making in combat uses the behaviour tree shown below. Once the game mode notified that it is the enemy's turn, the tree begins with a short delay and UI effect, then calls Start Turn - a C++ function that decrements any cool-down time on used abilities and checks for any ongoing effects that have ended. It then chooses what action to take based on the enemy's mood before ending it's turn.
The enemy's mood is a gameplay tag that is updated at the end of it's turns and when it takes damage. It is set using the enemy's remaining health and a random number generator to try and make it's decisions seem rational but not predictable.
Status | In development |
Platforms | Windows |
Author | Kirsty Kidd |
Genre | Role Playing |
Tags | 3D, Cute, Fantasy, Short, Singleplayer, Turn-based, Unreal Engine |
Leave a comment
Log in with itch.io to leave a comment.