DungeonBot3000: Inventory and Items Display

Published February 22, 2019
Advertisement

The challenge is over, but that doesn't mean I'm done working on this thing. Diablo-clones are a core part of my fundamental nature as a human being, so of course I was going to get addicted to working on this project.

Main things I've been working on have been tweaking the on-screen display of loot item tags to eliminate overlaps:

cIizucB.jpg

and I have started work on building the inventory and equipment management systems and UI:

uJf9QMi.jpg

UI is a fiddly, annoying beast to work on, and these kinds of inventory control systems with their UI are some of the worst. Lots of little edge cases, a whole lot of widget wrangling, some pretty complicated interactions etc... Luckily, the world has advanced since the days of Diablo 1/2, so I have plenty of existing models for how it should function properly. This system is far away from the levels of polish that will be necessary, but it's getting there.

For the UI tags, I tested several different methods, and finally settled on the simple scheme of collecting all items within a radius of the player, sorting them based on their world coordinates so that they are in back-to-front order as seen from the player's view, then inserting their labels one by one into the label container for display. If a label to be inserted overlaps any existing labels in UI space, move the label downward until it no longer collides. While there is occasional flickery weirdness this way as the player moves, it seems to be at least on a par with Diablo 2, and doesn't suffer from some of the weird inaccuracies that Path of Exile suffers from.

As far as the inventory system, I am at the point where picking up items places them in your bag, after first attempting to place them in an open equipment slot appropriate for their type. Can't drop anything yet, and can't yet move from bag to equipment and back, but that'll be on the menu for tonight/tomorrow.

Next Entry Gold Rush
3 likes 0 comments

Comments

Rutin

Nice additions. :) 

February 22, 2019 01:41 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement