I have started my little project a couple of days ago in Unity, and so there's already some stuff to be written about.
Today, my work from two first days. Tommorow, I'll write about the third and the fourth day. As the time goes on I hope to post whenever I make a bigger commit to my repository and describe everything I've worked on between posts.
Basic Functionality and Attributes
September 14
For now I don't focus on movement, visuals or animations. My goal is to develop an ability system that suits my liking.
I've created basic Rigidbody2D-based player movement scripts with some placeholder sprites and animations, just so it feels at least a bit like a game.
The first big thing to work on were Attributes. I have decided to start with them, since both Resources and Abilities are supposed to use Attributes to modify certain values.
The Attribute class is not too convoluted, it stores the Attribute's name, value and a multiplier that modifies how hard it is to learn certain types of Attributes. It of course has two public methods that take care of addition and subtraction. On top of that there's a public property “Value” that returns the attribute points multiplied by the modifier and floors it to an integer.
Attribute
An Attribute is a very self explanatory class, that stores value and manages it.
Value being multiplied, no matter if it's added or subtracted makes certain Attributes harder to learn, but also harder to lose.
There's also an AttributeClass class (I know, quite an interesting naming convention, but it made sense to me), that stores an array of Attributes, and finds them by name.
It is mainly for partitioning Attributes into groups of Body, Mind and Magic that are used for different kinds of Resources and Abilities.
These are the Attributes I have created so far. I will surely expand on that list as the time goes on. Especially on the Mind category.
The Resource class
September 15
Resources were particularly important for me. I wanted to make them familiar, but also not too plain.
There are 3 Resources; Health, Stamina and Mana.
Most of the time Stamina and Mana are used for casting Abilities and Health is used for sustaining damage. However, I am also planning on implementing Abilities that use Health as a Resource.
Each of the Resources starts off with maximum value of 100. This value is then increased by Attributes, specifically assigned to that Resource. Each Attribute point translates into a percentage by which the Resource is increased.
E.g. Health of 100, with the Vitality Attribute of 200, which has a modifier of 0.5% per point, Becomes Health of 200 maximum.
The current value of the Resource is also increased (or decreased) to match the previous percentage.
Each of the Resources also has Gain and Loss modifiers that mediate in Gaining more and Losing less of the Resource. Those modifiers are also affected by certain Attributes (like Recovery and Focus for Stamina Gain).
And here's a short video demonstrating the front-end of the Resource class.