Jump to content
  • Advertisement
  • entries
  • comments
  • views

Project: DungeonBot3000

DungeonBot3000: Inventory and Items Display

Sign in to follow this  


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:


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


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.

Sign in to follow this  


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!