Current Progress


Its been just over a month since I worked on this asset last, and I made some progress today.
Items weren't movable at all, so I worked on how I detect what the mouse is over and whether it will move the inventory itself or an item. It's in a pretty good state now imo and Im happy with that part of it.
As you can see, there's still at least one crash that can occur when dropping an item into an inventory. This is because I was still using an array of "unique" numbers to determine where an item is. Eg if a shield takes up 16 squares, each of those squares would have that shields unique number.
The crash occurs because Im not currently resetting the squares to -1 that the item covered.
I don't like this way of doing it any more, and it makes much more sense to just be checking points in rectangles. Each container already has an array of items that know their coordinates, and that's how I detect what item the mouse is hovering over, so why not just use that same method to determine whether there is free space in the inventory or not?
That's what I will be working on/updating next.

After that, all that's left is to have items drop to the ground if mouse is released and it's not over an inventory, and to show an example of saving/loading all of these containers/inventories, neither of which will take too longI believe.

Get Diablo-style Inventory

Buy Now$20.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.