DevLog5


Dev Log 5: Inventory System

Overview: This update details the implementation of a modular inventory system using three main components: ItemClass, SlotClass, and InventoryManager. The system supports item management, slot functionality, and drag-and-drop mechanics, integrated with a dynamic UI.

Key Features

Item Management

  • ItemClass: Defines reusable item data using ScriptableObjects.
    • Attributes: Name, icon, stackability, and type (Misc, Tool, Consumable).
    • Consumables affect health (addHealth) or mana (addMP); tools include categories like Sword and Axe.

Slot Functionality

  • SlotClass: Manages individual inventory slots.
    • Tracks item and count.
    • Supports adding, removing, and stacking items.

Inventory Integration

  • InventoryManager: Coordinates items and slots with UI updates.
    • Features:
      • Add/remove items with stack merging for stackable types.
      • Drag-and-drop functionality with snapping to closest slot.
      • Visual feedback via UI updates and hover icons.

Next Steps

  • Add tooltips, animations, and sound effects for better feedback.
  • Test edge cases like full inventory and non-stackable conflicts.
  • Improve visuals with slot highlighting during drag-and-drop.

Summary

The inventory system is functional and supports flexible item management with a responsive UI. Next, efforts will focus on polishing the user experience and testing.

Get Ultra Shapes

Leave a comment

Log in with itch.io to leave a comment.