Monday, 9 April 2018

Pickaxe Upgrades, Consumables

In its current state, the game feels very… slow. Mining takes forever, especially when mining more valuable blocks. This progression through the game is intended, which is why the Player needs a way to upgrade their mining equipment so that they can mine blocks faster.

In this section I have added Player pickaxe upgrades which are buyable from the shop. I’ve given these upgrades some basic stats which will need to be more thoroughly tested once the game is in a stable condition -this also goes for the cost. One issue that I had with this system, although not necessarily a problem, is that the objects that are created must all be the same type in order to add them to the inventory. This is because the objects of the list are scriptable objects and aren’t subject to monobehaviours, therefore they don’t have a script attached to them and they don’t have their own behaviours. Because of this, I decided not to add them to any menu or inventory, but rather just display the pickaxe that the Player currently has equipped.















Another unintended repercussion of the inventory system are the consumables and ladders that I have added to the shop, which derive from the same script as the pickaxes and other consumables. These consumables are added to a list which is displayed on-screen in the upper-right hand corner of the screen. When used, the amount (which is stored on the object as quantity) is decremented by 1 for each item used. My solution is this problem, to distinguish which item was consumed is that each item has an enumerated ‘state’ which is defined as a category. Then whenever an item is bought from the shop, the item’s category is checked, which helps to determine the behaviour which will follow. For example, if it’s a pickaxe then the appropriate stats will be applied whereas if it’s a consumable or ladder then the quantity variable on the object is increased.

No comments:

Post a Comment

Download the game and Project Files!

The project files along with any additional documentation are located in this folder on my Google Drive. To download the game please down...