What is UML - Unified Modelling Language
The Unified Modeling Language is a general-purpose, developmental, modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. Wikipedia
In This Post we are going to Show how to Design Activities within the Inventory System such as Adding an Item to a specific Inventory and make a Drag and Drop with the Mouse System to Move Items between the Inventories.
The following UML Diagrams are designed to work with the Zeus Unite – Item Database Management System. However They should be also useable for any type of Inventory since they are on a Basic Level and shows the Activity of a Inventory when adding an Item.
Add Item to Inventory UML Activity Diagram
Inventory Drag and Drop UML Activity Diagram
This is the Basic Idea of a Drag and Drop System inside a Inventory
“The Player starts Dragging a Item”
and we End always with
on the way we will ask a bunch of different Questions to the System in order to proceed correctly with our following Logic.
The Question if the Inventory has enough Space is also based on the Inventory Space System you are using. The Logic will be different between Grid Based, Slot Inventories, Grid Size Based and other Inventory Types.
You need to Check for Limitations such as: Check If the Item can be Stacked and whats the Maximum Stack Size, if you have Limitations on that. There also the possibilitie for Endless Inventories. Without Weight or anything.
Inventory Add Item and Inventory Start Drag In One UML Activity Diagram
This Diagram shows how to Combine Two Actitivities together and is extendet with a Max Stack Action and should give you the Direction how to solve the Logic of a Drag and Drop Item Slot Inventory System with 2 Different Functions.
We hope we have been able to give you some ideas for designing your own inventory system. There may be more or less things to consider when creating an inventory system and is based on the Project.
Using UML in game projects can be very handy. It is easy to understand and gives you an overview of the logic you are about to create.