I want to create a ability system like any moba (LoL, Dota 2, etc.)
Originally I started thinking about this system a weapon system instead of an ability system. And depending on what weapon the player currently had equipped this is what would drive the attack.
However, after thinking about it for a while I came up with a lot of holes in that approach.
So, I’m trying to figure out what other people are doing. I thought of using interfaces and a class hierarchy to support this. I also think it would be a good idea to utilize blueprints for some of this as well.
My current code is implementing this via the weapon system approach. Attempting to think this out I drew the following diagram.
Keep in mind that I’m not asking how I would implement the logic for my concerns (the red notes). I’m trying to think out how this code would be organized (not the logic, I know how to code logic).
Now that I’m thinking of more of an ability driven system, I’m thinking that I should start from an Ability class and work my way down.
I know that I’ve heard composition over inheritance, but I have trouble designing systems like this on paper.
Also, I’ve thought about possibly making this configuration driven. However, I would really like to keep this as simple as I can. We get used to doing things so easily and quickly in Unreal. So organizing a system like this is pretty daunting.
Could anyone help me organize my thoughts?
Any code or diagrams are appreciated.
Also, if anyone knows of any tutorials around this I would love to see them. I really couldn’t find much on this topic.
Thank you!