Martyn Patrick / Portfolio
Dungeon Game V2
Dungeon Game V2, is a Vertical slice of a dungeon crawler made in Unreal Engine and using the Gameplay Ability System (GAS.)
It's a project I'm still currently working on, so I will be updating this as I go.
Presently there are the following features implemented:
-
An adaptive HUD system where the health bars of enemies are displayed when the player gets close enough. The health bar stays with the enemy as it and the player moves. Health bars update when a message (using the message subsystem.)
-
An 'Goblin' enemy which chases and attacks the player, turning to face the player if it not in it's front arc.
-
A 'Knight' character Class for players to play, which is fully animated with unique abilities.
-
A highly customisable and scalable ability and attribute system, so that adding a new ability to an existing or a new hero 'Class' is easy! Allowing me to quickly add new content.
-
A melee attack ability, A block ability which causes incoming damage to be taken from that character's shield health before their health. A taunt ability used by the knight class which also grants them increased damage reduction for every enemy they taunt. A bulwark ability that grants damage reduction to the tank and every ally in a small radius. The tank's shield health slowly recharges while they are not blocking.
Every hero has the following abilities: A left click (basic), a right click (Alternate), Q (Ability 1) and E (Ability 2).Left and right click are fairly standard, a basic attack be it a firebolt or swinging a sword. With right click for heavy attacks or trying to block. Q and E are for the main abilities these will have cooldowns or/and cost some sort of resource to use. As I only have the knight implemented, it made sense their abilities just went on a cooldown as I feel it should be the strength of martials they should be able to keep going through the dungeon. Although I did play with the idea that they should use the 'Shield Health' as a sort of stamina bar.
The abilities are arranged into a Ability Set, all the abilities in the character's ability set is added to their ability system component at runtime. The macros of which assign the ability to the relevant key, allowing me to create a bunch of abilities and then trigger them seamlessly by adding them to that character's ability set.
Thanks to the gameplay ability system the characters also have attribute sets. Now, because of what I wanted to do with the shield blocking ability with the Knight Class. It wasn't possible for me to intercept the damage to the StandardAttribute's Health attribute in a clean and tidy way. Ideally, I'd like my characters to have a StandardAttributeset and a ClassSpecificAttributeSet. Unfortunately, the gameplay ability system 'helpfully' only calls Attributeset GameplayEffectExecute functions on AtttributeSets that contain the Attribute being changed. So, when my 'Damage' attribute was getting changed, my shield health didn't know about it!
Of course, the obvious answer to this was inhertiance, that 'TankAttributes' should be a Subclass of 'StandardAttributes.' While this is a fine solution and ultimately what I settled on, it's not as clean as modular as I'd have liked, but sometimes development is about making the best decision you can given the circumstance. And atleast this way, there's no overlap and everything nicely has it's concerns separated.
Please note, there are some obvious inefficiencies in some of the code where I'm grabbing something each time the code runs and not just grabbing it once on begin play and then storing it. I'm aware, I've just not had a chance to clean up some of the rougher edges yet.
Working on next: abilities with a cast time, a mage class, a dungeon boss.