Inventory System

Recently I was playing Subnautica: Below Zero and it inspired me to develop my own inventory system with the same mechanics.

Design and Mechanics

The inventory system is designed to be sorted in a custom way (e.g. alphabetically) and each slot is not stackable. The user can assign objects to a toolbar slot either from their backpack inventory or the toolbar. The user can also store their items to storage containers and retrieve them in the future. I used Scriptable Objects to create different types of items divided by categories such as resource, consumable, equipment and tool. Each category has its own features but inherit from the same Scriptable object.

The player can pick up items, smash objects to get resources (e.g. stone, tree trunk) and open any storage container using the left click. The backpack can be accessed using the Tab key. When the backpack is open the player can assign any item to their toolbar using the binding keys 1-5. On the other hand, when the backpack is closed, the player can equip any item in their toolbar using the mouse scroll wheel. In the demonstation video you can see that the player assigns the knife at the first slot in the toolbar and equips it. Doing so, the damage that the player can now do is increased, allowing them to smash the rock and tree trunk less times to get the resources. In addition, when the player equips an item, they can drop it by pressing right click. This is also allowed when the backpack is open and they hover over an item while clicking right click. In contrast, clicking the left click allows the user to use any consumable while the backpack is open (i.e. consume it) inceasing their health.

Project information

  • Category: Game project
  • Project date: On going
  • Project URL: Source Code
  • Tools: Unity, C#, Photoshop