Gameplay Ability System

In my game project is a 2.5 side scroller action platformer, I want to unlock abilities like wall slide, wall jump, double jump as the main character progresses through the game. However, before start doing it I would like to ask are there any alternatives for GAME ABILITY SYSTEM. Many people on the forum advise to stay away from it. Please let me know what do here?

I don’t understand what you’re asking – if you don’t want to use what is provided, then you’re going to have to design/write your own.

Ah no, I didn’t mean that way. All I am asking here is that whether it is okay to wrap my head around GAS for actions like wall jump, slide and dash. And if not then what are the alternatives to it.

Hello.

I am also exploring to see if I can use GAS into my ‘Hades-like’ roguelike project. I wish to provide many abilities to the hero and enemies, spawn many waves of enemies, and progress hero’s abilities with levels as well.

Honestly, I learnt Gameplay Ability System from some tutorials on the internet, and I have decided to stick to my own Ability System rather than using it.

You see, no matter which Ability System you wish to use, most of your coding and programming, will be the ability logic anyway. And judging by the abilities you wish to add, it seems like you will have to make the character stick to walls, make collisions, line-traces etc. Even if you add costs for abilities to attributes in your game, Gameplay Ability System might be an overkill for such use case. My humble opinion.

Gameplay Ability, Gameplay Effect, Gameplay Tags, Gameplay Attributes are the 4 main aspects of Gameplay Ability System. Gameplay Abilities can be activated and carry some Effects, the Effects effect Gameplay Attribute(s) of Actors (who own AbilitySystemComponent). Gameplay Tags may/will be required throughout this entire process.

Here are the difficulties I faced:

  • Gameplay Ability System relies heavily on Gameplay Tags.
    • These are similar to tags for components that you can already use in the engine although, these tags determine the entire functionality of the ability itself (a tag to provide “deplete health effect” on melee collision can be changed to a tag to “add mana effect”).
    • You’ll need to have a well-thought-of design to keep track of all these Gameplay Tags.
  • Any Gameplay Ability you use, requires you to have created Gameplay Effects - even cooldowns and costs are Gameplay Effects.
    • These gameplay effects can have instant attribute changes, or changes to attribute over a duration.
    • They again require the use of tags for Event Listeners and other ways to communicate with Target Actor or Instigator Actor.
  • Attributes are a big headache - even for simple use cases like health, stamina and mana.
    • They are essentially structures, Gameplay Effects directly effect attributes.
    • Attribute is different, attributeData is different, both being structs - Effecting attributes is a pain for simple games because of this ambiguity.
  • It may be hard to achieve a Uni-Directional Data Flow - once an ability is activated, many modules can be involved.
    • A simple melee can have many things involved, like weapon collision used to set a gameplay effect tag, and the melee ability class listens for this event and Tag, and needs a ‘payload’ to “apply effect on Target”.
    • It could still be possible to do it better. Again, you need to think of good programming patterns and avoid any kind of 2-way dependencies.
    • GAS won’t come to your help here.
  • If your game is small, easier to create stateful system on your own than GAS. (player-wall-running state, player-wall-sliding state, player-in-air state etc. using simple enumerations.)
    • Even disables, like stun, silence, disarm, ability-channel etc. can be states set-up as enumerations.
    • You can use these enumerations to block input or other operations as per your use-case.

TL;DR: My advice is, read the documentation on GAS, and take inspiration for your own ability system. Where can you do better? What is lacking that your game needs? Or what is too much, that your game would never need? Try designing your own ability system using these ideas. If there isn’t much difference, you may learn and use GAS - because of the low-level performance optimizations it can bring to your project. It is not too difficult to implement once you understand the “design-thinking” Epic has used.

You could also try doing a couple of hands-on tutorials on GAS. If it is too complicated for your game, please avoid it. It most likely will be. Even Elder Scrolls 6 (single-player) need not use GAS.

And I am open to any corrections if I am wrong on what I have written above.

Good Luck on your Game Dev journey! :smile:

1 Like