14 February 2019

a narrative rpg | development blog
Previous post
Next post
14 February 2019 || Character switching and inventory images done

Welocome back everyone! Another month, another update. For this time I got two kinda mundane but necessary things finished and crossed off the list. First off, a menu for switching between the different character sprites:

I know, it looks very small and insignificant, but it took a couple days to get working properly and the way I wanted. The sibar of the menu now diaplays a little icon of whichever charcater you're currently controlling, and clicking on it will bring up the mini menu in the image where you can choose any of the characters currently in your team. If the character choice is locked (needed for story reasons every now and then) there will be a lock icon next to the character and the menu won't open.

It was a pretty straigthforward setup, mostly I just got bullied by a pesky bug with switching the character sprites, to which I was never able to find a real solution and had to shamefully code a sad workaround to mask it. Basically I couldn't get the sprite set for the animations to update to the next character until it moves a tiny bit, no matter what I tried, and I couldn't find documentation of anyone else having the same problem. So after spending most of a day just on that issue getting nowhere the switching character code will now call a tiny little function that moves the character forward the tiniest bit, updates the sprites, and then moves it right back where it was. It works and has no side effects so far, but oooof, just patching over a bug you don't really understand feels iffy. Oh well!

The second thing I finished was just implementing and drawing some images for the items inventory. It's just been a white blank square so far, but now it'll actually display a proper image next to the item description when you scroll through the inventory. I'm not doing an image for every item, just one per category (like medkits, armor, boosters, bandages etc.) but I coded in a hook for also having the option of specific images for specific items, just in case I end up wanting some special items with their own art. But outside of that possible future case the inventory image setup is also all done.

So there we go, super uninteresting content, but very important and nice to put into the finished list of tasks. Next month: no idea! It's a grab bag of little outstanding tasks to wrap up, or I might do some art again. See you then everyone~