One of the most difficult things to do while working on the inventory is to not go crazy implementing too many 'cool features' too early as that might cause me to have to refactor a lot of work if I decide to change things once the design starts gaining a bit of focus.
In the case of potions I added this week that concern actually came up several times in the code and once with the art as well!
I decided to have potions have two major qualities that help delineate what they are.
The first is what PotionType it is such as Health, Mana, Strength etc.
The second is the PotionStrength which is where I got in a little bit of trouble with over-doing things I think. I decided it would be a good idea to essentially have an greater number of PotionStrengths than there are ItemQuality levels.
So basically if ItemQuality is broken in to an enum like this:
public enum ItemQuality
{
COMMON,
RARE,
SUPERIOR,
ELITE
}
And the PotionStrengths initially looked like this:
public enum PotionStrengths
{
TINY,
SMALL,
MEDIUM,
LARGE,
HUGE,
FULL
}
This became a problem in two areas.
The first is when I use the item inspector I color the title of the item according to its ItemQuality.
I should have stopped right there because 6 PotionStrengths is more than 4 ItemQuality levels; and that was going to make my code more complex, or I would have to ignore strength as a factor when it comes to evaluating a potions quality.
Of course though it makes all the sense in the world that a potion that is really small/weak is lower quality than a potion that is big or full ; so I should have put a bit more consideration in right then.

I have a quick screen here to show I kept the process pretty simple; I actually modeled this in Silo 2 and then used the "Subdivide" feature in the program to "smooth" it out and took a screenshot within the Silo 2 program! I did not bother to do a 3d Render as that would have taken a lot more time for production and it looks good enough - especially as you see in the last shot I overlayed and applied a mild Photoshop effect (took literally 5 seconds) and it looks great!
So as I was iterating through the design's of all the potion bottles some things occurred to me when I got to the 4th bottle:
1) For every additional potion strength I do I have to come up with another at least mildly interesting potion bottle to visually display that this potion is different to the user (read I was raising my production time )
2) For each of those it will take up additional video memory that has to be stored
3) It was becoming clear just from the sheer number of bottles I was modelling that this was just too much variety; it was going to become inventory clutter rather than useful.
So I took a step back and decided to keep it down to 4 PotionStrengths after all going with
public enum PotionStrengths
{
TINY,
SMALL,
MEDIUM,
BIG
}
Which ends up being convenient in several ways and implements something I like in theory which is each one of those can represent a potion that increments its strength by 25% so you have potions that can "heal" or "restore mana" of 25%, 50%, 75% and 100% making their perceived usefulness and quality match the ItemQuality levels perfectly!
As well thiss makes it more convenient when you are in a difficult fight to make a decision to use a 25% or 50% potion rather than a 100% every time because that's all you have available. If all you had was a 100% potion you might save it until your health is extremely low because you want to get full use out of it.
Also this lets me give out healing and mana potions more frequently as the stronger ones will be rarer and therefore perceived as more rewarding (and hopefully exciting!) finds for the player.
Also .. if you hadn't figured it out yet.. if I stick to this strict scaling of 25% - 100% values .. the potion retains its usefulness no matter what level you are!
When I had 6 PotionStrength levels I was thinking to scale the potions for hard coded values like 10 health, 25 health, 50 health and so on. In a percentage paradigm the potion will retain an equally relative value to your level through out the game!
And when i realized that I knew I had the right answer and fixed the code to match the 4 level quality and kept myself from modelling further bottles and taking up more video memory!
Thanks for reading, see you next week!
No comments:
Post a Comment