Inventory, Inventory Everywhere

February 9, 2024

Shock, horror! I missed a blog post week. Apologies, all. But now I’m back and kickin’ butt. Or inventory.

One of the challenges of Sleuthhounds: Cruise is that it’s much bigger than all the previous Sleuthhounds games put together. It’s size means there are certain technical problems that must be solved that the other games simply didn’t have. One such issue is the handling of character inventories. Put simply, in Cruise for the first time characters can carry more items than can be displayed at one time.

[You cannot tell from the screenshot, but Ampson has more inventory than can fit on screen at once.]
You can’t tell from the screenshot, but Ampson has more inventory than can fit on screen at once.
Click to view larger.

With space for eleven items at the bottom of the screen, the size of the inventory has always been more than enough for the earlier games in the series. It’s also been enough for the bulk of the development time on Cruise as, when I’ve been testing, I usually get an item in the game and then go use it right away. This has caused enough items to be taken out of the inventory that it hasn’t overflown the screen. However, now I’m doing a “worst case” plathrough, where I’m allowing inventory items and different investigations, which are tracked by the in game journal, to stockpile. This has shown some places in need of interface improvements, including the inventory.

Overhauling – or “refactoring,” as we software developers say – a part of the interface can sometimes be a hugely impactful task. Fortunately, in this instance, past me was thinking about future me’s well-being. Although I didn’t build the interface to allow for the scrolling of inventory, I knew that one day a scrollable invenotry bar might be needed. As such, I structured the code for the inventory in such a way as to support more inventory than could be displayed. That forward thinking made it way easier to expand the inventory to be scrollable.

[Check out that scrolling to the right and to the left action!]
Check out that scrolling to the right and to the left action!

On the top of scrolling, when I hooked all this up to allow for scrolling in general, I’ve also specifically tied the scrolling into the mouse wheel. Rolling “up” on the mouse wheel scrolls the inventory to the left and rolling “down” to the right. Despite mouse wheels being standard for many, many years and being used in other game genres for this very purpose, I’ve rarely seen the mouse wheel taken advantage of in adventure games. It’s a minor thing, but minor things add up over time. However, sometimes major things are needed too. We’ll see that next month when I get back to the walkthrough system and the changes needed to support the greater number of investigations available in Cruise. See you then!