Production II Blog | Item Tiers
As Snowball Showdown's Alpha drew closer and closer, our team decided that it was time to implement various tiers of items into the game. This was something we had been discussing for several weeks until this point, though we had yet to incorporate it due to only having four items in-game at the time (rocks, knives, grenades, and cats). But with the core game loop now closed, we could finally begin to spend more time incorporating new snowball types into the game, making it imperative that add a proper tier system as soon as possible.
Creating the Tier System:
On Saturday, April 13, I began putting together a basic skeleton for the items' tier system in Unity. This involved creating three new scripts. The first script was a simple container for various pieces of information, including an array of GameObjects (that would later be used to store items from a given "line" of items) and a string for the "line"'s name. The second script was far more in-depth, containing an array of the first script and a function that, using random chance, would determine one of various effects whenever the player placed a snowball into the Snowblower.
These effects were as follows:
The first of these effects involved outputting an item one point higher in the input item's current line (i.e., if the player put in a snowball with a rock, they might receive an anvil in return).
Another less-common effect was similar, but instead, it output an item from two points up, rather than just one. This, along with the first effect, is intended to incentivize players to use the Snowblower more often, since doing so has a relatively high chance to give them something better than they initially put in.
A third effect simply found an equivalent item from a separate item line and output it instead (i.e., swapping a grenade with a knife, as both of them are considered "Tier 1" items).
A fourth effect downgrades the item, adding a touch of randomness and forcing players to consider whether or not it is worth placing an item into the Snowblower if it may possibly come out weaker than before.
Unfortunately, the system does not function perfectly yet, and Unity is prone to crashing after outputting two or more items. Further testing is required to understand why this is happening and how I can fix it, which I intend to work on in the coming days.