Lost Caves Devlog #17 - Tons of Treasure


Ever since I first conceived of Lost Caves in mid-2011, I always knew that I wanted there to be a focus on exploration and treasure hunting. That feature is, of course, already in my game now. That being said, it was always missing something that I’ve wanted ever since day one pretty much.

So, Lost Caves’ was initially inspired by The Great Cave Offensive in Kirby Super Star (specifically Super Star Ultra in this case), and a big part of that sub-game was treasure collecting. What was cool about it though was that it wasn’t just the same treasure items over and over. Every single piece of treasure you picked up was unique, and that’s something I’ve always wanted in my game. This concept existed in an old prototype of Lost Caves I made back in 2014, but that never got far. I wanted to do it in the one I’m making now, but when I first started developing the game in 2017 for a class, I didn’t have a lot of time to make every single piece of treasure unique. So I resorted to making a handful of various different, somewhat generic, items. This week I decided to change that. Every treasure that you picked up would be unique. The idea was to keep players interested in treasure hunting, making them wonder what would be the next item they would pick up. For much of the week, I spent time making sprites for various treasures the player could pick up while playing. The game has over 80 chests that can be opened, so I needed over 80 individual items. It was quite the challenge, but I had some friends who gave me ideas for what to add. Plus, I had sprites made for different items in the 2014 prototype I mentioned, so I used some of those ideas, but re-designed them to fit with this game’s style and color palette. Below is the sprite sheet of everything I’ve made thus far. Right now I have 86 different treasure sprites. If you have your own ideas, let me know!


That being said, a simple sprite of an item that pops out of the chest and flies to you only does so much. What if the player didn’t get a good look at the item? Well, pretty much from the get-go, I wanted Lost Caves to have an inventory system where the player would check out their collection of treasure, and get a look at everything they’ve picked up. Each item would also have a short description of what it is. For a while though, I wasn’t quite sure how to handle this. I couldn’t visualize how to get information from chests that you’ve opened and the treasure it contains. However, now that chests are stored in a list, and not an array with a fixed length, this made things easier. I had to make an additional list that contained the sprite information for each treasure item collected. Before that though, I had to set up a proper UI for viewing the treasure.


The UI is accessed by pressing the ‘select’ button on your controller, or by pressing the backtick key (the key below ESC). On the right is your inventory of every item you’ve collected, and on the left would be a close-up image of the item, and under it would be a brief description. Setting this up took a bit of time, especially the scrolling functionality of the inventory, which still needs a bit of work, but I was able to get the UI designed with few headaches.

As for getting the treasure to show up on the inventory screen, that was a bit more complex. Not too complex, but it just wasn’t super straightforward. It involved communication between different scripts to get the necessary information, but I was eventually able to get it working. Every slot in the inventory screen has a number that would correspond to an element in the treasure sprite list I mentioned before. If that element exists, then it would apply the sprite contained in that element to the inventory slot, making it visible. That’s all fine and dandy, but how do I show a close-up of the item, along with a brief description?

Setting up the close-up image wasn’t too difficult (Although there were some hoops I had to jump through due to some mistakes I made), but for the descriptions, I decided to make a text file for each treasure item that contains its description. The contents of that text file would then load in the inventory screen, and voila! My inventory system now works! I ran some tests and had myself pick up two different treasures in my playground scene, and I was able to view them both in the inventory screen and read their descriptions! Check out the video below.


Next to adding proper saving and load of game data (which is thankfully in), having a working inventory system was one of the largest hurdles I knew I’d have to cross eventually. For a long time though, I was unsure how to do it. Now that it’s finally in place though, I think it’ll make the game much more interesting, and increase the player’s desire and motivation to collect treasure, so they can check it out in their inventory screen and read what it is!

Get Lost Caves

Buy Now$6.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.