top of page

Coding Skills: Future Developments 10.0

Updated: Oct 19, 2023

Much in the same way that regular attacks require stamina to be done, spells also require a sort of stamina to be casted; magic points. It will function in mostly the same way as the stamina bar, that it starts at full when a player respawns or loads in the game, and with every use of a spell, depending on the spell itself, a portion of the bar will go down, until it reaches 0. Unlike the stamina bar however, this will not be self regenerative, in the sense that the player will need to acquire certain flasks throughout the game to replenish their magic point bar. Alongside that, a system of levelling has already been added, however a currency to trade in for the upgrades is not yet in place. That is where soul orbs come into picture. With every kill, depending on the strength of the foe, it will drop soul orbs, which once harvested a certain amount of, can be used in the levelling system to upgrade player stats.


Magic Points:

Magic points will eventually be able to be earned through a multitude of ways in the game, but for now, there will be one main source; magic flasks. These will be able to be crafted, and will replenish 300% of the current value of the magic bar, increasing as it is upgraded with soul orbs. The way the flasks will function is using a sprite for the image of the flask, and using an if statement to detect if a certain key is pressed when the flask is held in hand by the player. This will cause an animation of the flask being used to play out, triggering a method to do a simple calculation of 3 * currentValue, and setting it as the new value. As for its reduction, it will be dependent on the spell casted, but can be calculated by newValue = currentValue - spellCost.


Soul Orbs:

These will drop when an enemy is felled by the player. The animation will probably have to be custom made, since mixamo will not give visual effects like that. A simple counter can be used to record how many orbs the player has, and when used for levelling, an equation involving the subtraction of the current and upgrade cost can be used to find out the remaining orbs they have left.

_____________________________________________________________________________________________________



Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page