Skip to content

Narwhal Simulator 14: Store

Hi everyone! Today’s post is about the shop. I’ve made lots of progress on it since last week that I’m excited to share with you. This post will be a little short today. I did a lot in the last week, but it can all be summed up pretty quickly. There wasn’t really any interesting code involved either.

In the last week, I added a store. Here’s what it looks like:

The store consists of a scrolling panel which has all the items available for purchase or equipping displayed. I intend on separating the owned and unowned items at some point, maybe into entirely separate menus, or maybe just with an option in the store to filter owned or unowned items. For now, however, this works fine. Each store item displays the following:

  • An image of the item. These don’t look very good at the moment because I just shoved their in-game textures in. Eventually, I’ll either draw them nicely, or just take a screenshot of them. Either way, these aren’t final at the moment.
  • The name is displayed at the top
  • Below the name is the subtext. This displays whether the item is owned and what the item’s rarity is. I still haven’t fully decided if items are going to have rarities, since they are bought rather than found. If I decide not to have rarities, I’ll replace this with something more useful. If you have any strong opinions on rarity, as usual, you can leave it in the comments or email me about it.
  • Below the subtext is the description. The items don’t have descriptions at the moment.
  • Below that is the price and the purchase button. Price is measured in narwhal coins. The purchase option turns to an equip option if the player already owns it, and the button turns to equipped and doesn’t do anything if the player already has this item equipped.

I tested the shop UI at all the most common resolutions so I think it should work no matter your computer. I plan on changing it later. It’s OK for now but it’s not really all that good.

Thanks for reading! I’ll keep working on the store over the next week. Right now, the player’s inventory system works but isn’t very smartly designed. There are also several inconsistencies in the code that could cause issues, so I’ll be working on redesigning the store code and the player part code a bit. I was really hoping not to have to redesign it, but it was inevitable. See you next week!

Links recap:

GitHub: https://github.com/AgentD1/NarwhalSimulator

Trello: https://trello.com/b/Nd7rNvWU/narwhal-simulator

Leave a Reply