Sprint 1 - Inventory System


Sprint 1: Inventory System 

5/18/2024 - 5/23/2024

Overview: implement an inventory UI with slots that items can be placed into, items that can be found on the ground in the world, and chests that can be opened to take items out of (will require a separate, smaller UI) 

Prep

  • UI (inventory and container) 
  • Container prefabs 
  • Item prefabs 

Tuesday - 5/21

  • Implement player inventory script with premade UI elements
  • Set up container UI 
  • Add, drop, and use item functionality 

Wednesday - 5/22

  • Write a script to let the player take items out of/place items into containers 
  • Add at least one item to be picked up from the ground 

Thursday - 5/23

  • Debug 
  • Make devlog (in progress) 

Results 

I did not complete every objective in time, nor did I finish debugging. The container UI exists but has not been implemented in code. The inventory itself is complete except for dropping items, but there are some serious bugs. I will make a bounty list for bugs that are annoying but that do not need to be fixed right away. 

There will be another devlog dedicated to dropping items from the inventory, which was a way more complicated endeavor than I'd expected. I'll need to tweak my inventory system a bit and add to the design of the Item scriptable object, which needs to be able to support both an item that is in the user's inventory (UI image) and an item that is on the ground in the game (GameObject sprite). 

Still, six objectives out of ten, while not ideal, is better than nothing. I think I didn't give myself enough time to complete all this stuff, so I'll plan more carefully next time. 

Inventory screenshot with demo buttons -

(Mostly) functional inventory!

It's not all bad, though! Features I did manage to implement include rearranging items by dragging and dropping, selecting items in the hotbar using the number keys 1-5, and a UseItem(Item item) method that can be called in the future to remove a single item from the inventory and provide an effect to the player. 

Items can also be picked up from the ground, and they stack. Demo buttons (even though they're cute) will not be included in the next game update. 

Leave a comment

Log in with itch.io to leave a comment.