Crafting and Inventory Basis Complete


Just finished the tutorial on making a crafting and inventory system on a separate Unity project. I used simple sprites and colors to represent the player (red), different ingredients (green = clover, orange = oregano, pink = rose petals, lime = scutes) as well as the potions (hot pink = healing, gray = stoneskin). 


Screenshot 1

Starting the game up in Unity's playmode. The player is seen in the center of the screen. At the bottom is the ingredient inventory, which shows the different ingredients the player has collected (which are harvested by clicking on the ingredients in the screen). Since the player hasn't collected any, they have 0 of everything. To the left are buttons that are used to craft the various (or in this case two) potions once the player has sufficient ingredients (healing = 1 clover and 1 rose petals, stoneskin = 1 oregano and 1 scute). To the right is the potion inventory, which shows the different potions that the player has crafted, and act as buttons so that the player is able to 'equip' a potion, which will show up on the top of the screen.


Screenshot 2

I moved the player around and started collecting ingredients by clicking on them, which have updated the text at the bottom to show how much of each ingredient I've collected (I have 2 clovers, 2 oregano, 2 rose petals, and 1 scute).


Screenshot 3

After collecting the ingredients (note: I collected one more scute between screenshots), I pressed the buttons on the left to craft 2 healing potions and 2 stoneskin potions, which have updated the text on the right, showing that I have 2 of each potion.



Screenshot 4 & 5

When I press the potion icons on the right, I will select whichever potion I pressed, and at the top of the screen it will show which potion is currently equipped. So if I press the healing potion, I will equip it, and same thing goes for stoneskin. One thing I do need to work on is making it so that if a player doesn't have a potion, they're unable to equip it. Yes they probably won't be able to use it, but the UI needs to tell them that hey, you can't use this dude.

Moving On

I will continue to study the code so that I completely 100% understand it. I will also start to change the code and UI so that it fits our game more, and this is a list of some ideas that could be done to do said changing, which I will review with my team first before anything is done.

  • Having a button to open/close the ingredient inventory/crafting system.
  • Having the potion inventory as a hotbar at the bottom of the screen so that the player will easily see how much of a potion they have and equip it.
  • Instead of clicking on the ingredients to collect them (which can be kept as well), I'll probably change it so that if the player is near the ingredient and press 'E', they'll collect it.
  • Maybe having a feed at a corner to show that a player has collected or crafted an item in text.
  • Maybe having popups when a player is near an ingredient that they can press 'E' to collect.

Comments

Log in with itch.io to leave a comment.

Another thing that can be improved is changing the equipped potion area to be at a corner or something