Pera Games
Pera Games

Character Manager System of Overfall

Hi there! This is Bulut, the programmer of Overfall. Today I’m going to talk about the Character Manager, a core system which keeps track of character stats, powers, animations and sound effects.

I’m the only engineer on the team, so creating systems that can be used by nonengineers is crucial to the project. The goal I had in mind when I started planning the Character Manager was to create a system in Unity allowing game designers to create new characters and determine their powers without requiring me to write a single line of code.

Every character is an instance of a class (CharacterStatHolder), and next to all the stats and prefabs, they contain three arrays containing instances of a class called “Power”. The Power class stores a skill’s range, targeting info, cooldown duration, and most importantly an array containing the class EffectBase, which is an abstract class with dozen of other effect classes deriving from it.

Now here comes a special ingredient. Normally, Unity’s editor doesn’t support inspecting abstract types. But after some research, I found an amazing plug-in called Full Inspector that helps you create magical things in the editor. With the help of this plug-in and the EffectBase array I mentioned above, our game designers can open up the editor and add or modify the effect of a specific power as they please.

 

CMS2

One neat feature we included was the ability to add sublists to any effect, allowing the designers to chain several effects to create powers I didn’t think of while developing the system. For example, there is an effect class called DamageEffect – which, shockingly, does damage to a character! DamageEffect contains two lists of EffectBase: one for a normal hit, the second for a critical hit. So the designer can add an effect that only works when the character hits the enemy, and add that to the sublist. Or they can make it apply only for critical hits.

We also added some effect classes that are basically condition checks. For example, there is an effect for checking if the target health is below a certain threshold. Another serves to check conditions on a target. One simply makes a random check. All of these condition checkers have sublists which are activated if the conditions are met.

Using this system, a designer could, for instance write a power that does damage to the target – and if the target has the Poisoned condition, the power would do more damage. If the hit was a critical and the target’s health was below 50%, the designer could instruct the power to apply a Bleeding condition to the target. He could even give the power a chance to heal the caster on a successful strike. All of this without requiring a single line of extra code.

I hope all that technical stuff wasn’t too complicated! As I find the time, I’ll write more about the Character Manager and the game’s other management systems for these updates. Drop a comment down below if you have any questions or comments.

 

Screenshot 2015-06-12 15.27.35

 

Leave a Reply

Your email address will not be published. Required fields are marked *