- What do I want to achieve?
The title described it, I wanted to make a game with a lot of skills in it (Example: Heroes Online, Critical Strike, Arcane Adventure, etc…)
In short, I just wanna know what is the Best Possible way to make a game like that without ruining the performance.
- What is the issue?
Honestly, there is no issue, all I wanted is just an answer to how can I make a game with different skills (blast attack, explosion attack, flight, lava pool, big bang, etc…)
Different types of skill.
- What solutions have I tried so far?
I tried to use OOP (Object Oriented Programming) but it doesn’t work well. I mean all it can do is make the stats for the spell, nothing more.
Like you will have to make another script on casting spells, you can’t just put 1 cast style for everysingle spell.
Question 1: Can’t you just use module:CastSpell[TYPENAME]
?
Well I tried, but it doesn’t work that great. I mean, different elements have different effects, I can’t just put everything the same.
Question 2: Can’t you just add stats for the spell so that when you use the function, it will cast depends on the spell’s stat?
Yes you can! But instead your code will be a mess with a lot of if statements, making it unclean which is really a problem on making big games.
Question 3: Have you tried ECS (Entity-Component-System)?
Well no, I mean I wanted to use it, but the documentation really confuse me, it doesn’t give me enough information to understand it. So if you can spend your time explaining me about this, then I really appreciate it!
Incase you don’t know about ECS (Entity-Component-System) then here is the documentation
Thanks for reading this long post! Hope you have a nice day. If you have any questions, feel free to comment it down below in the comment section!
Edit 1: Fixed the documentation link.