Replicated Gameplay Ability System
INTRODUCTION
After getting inspired by a video game idea I saw in a youtube video I started work on implementing gameplay abilities in unreal engine. Luckily unreal engine already had a framework for this: the gameplay ability system. The gameplay ability system or GAS is a system that provides the functionality to create character abilities generally used in RPG and MOBA games. This framework provides a nice workflow between C++ and Blueprints. The system also provides the option to replicate the abilities. Before this project, I didn’t know anything about multiplayer in UE4.
GAMEPLAY ABILITY SYSTEM
ATTRIBUTES
Attributes in the gameplay ability system are ways to keep track of health, stamina, and such. It is basically a player stats collection. Implemented stamina and a knockback multiplier attribute. The stamina attribute is to keep players from spamming abilities and keep fights tactical. The knockback multiplier is something you can compare to Super Smash Bros % Meter. The more you are hit the more knockback force you will receive in a fight. This is to get players to knock each other out of the arena.
ABILITIES
Rock Summon
The rock summon ability is the one I implemented first. It summons a rock out of the ground that the player can use as a quick counter or as a projectile to throw at their target.
Earth bend
The earth bend ability is an ability that affects earth projectiles it launches them in the direction the player is looking. This attack also adds the knockback multiplier when hitting other players.
Wall Summon
The wall summon ability is an ability that provides players with cover and helps them get some breathing time in fights.
Dash
The dash is a move that can be performed by players to provide a quick dodge but is kept as a last resort since it has a cool down to prevent players from outmaneuvering other players
Grapple
The grapple move is a recovery move. When players are knocked out it is their last chance to get back into the fight by grappling back to the arena
NETWORKING / REPLICATION
All this still needed to be networked so used unreal engine’s built-in replication system. I used the unreal network compendium to learn it myself. Most of the heavy lifting was done using the advanced session plugin for ue4. The plugin provides blueprint functions to interface with more of the advanced networking functionality using blueprint nodes. This helped a lot with understanding how it all fits together. It even allowed Steam to provide connections between me and my friends.
But the main goal of the project was to implement a game design idea I came across and implement it in unreal using the gameplay ability system.