Pagina's

Tuesday, 5 March 2019

Inventory is difficult but rewarding

Sometimes they say you only know what you have once you lose it. That is not true. I strongly object you know it when you try to show it on the UI. That's how the saying should go. It's been a couple of days now that I'm working on the inventory for my game. Because I'm still a noob, I'm letting myself be guided by an excellent tutorial that I found. Thank you, Craig! This tutorial helped me a lot and taught me the basics of keeping UI and the items separated and somehow I learned enough to get my own spin to it, which is most rewarding of it all.

What I have now looks kind of like the screenshot I shared the other day, but with some differences:


The first difference - and the main one - is that the UI actually reacts to the inventory that is there in the game itself. I have a sword and some coloured balls to pick up in this development scene and the UI reacts nicely to picking them up, so that it nice.

Second is the picture and info to the right. Obviously, that could use some font sizing, but it looks alright and I'm pretty pleased with my home-made sword sprite-placeholder. What it does now is that it finds the first item when building up the list on the right and using the same mechanic to show info of the object, but in another configuration (if that's correct English).

Later, I'll have it react to clicking on the list to the left. The pictures on the top will filter certain kinds of objects (e.g. Weapons or Food which mostly have very different uses, while apples might be inefficient projectiles too). The kind of thing that is selected will also influence the button the bottom right. Swords can be wielded, keys can't. Apples can be eaten, shields can't.

Next, I'll have the UI react to the clicking and refresh the panel to the right. Furthermore, I'll try and implement dropping objects like in Skyrim. I'll probably save the actual usage of objects for later.



No comments:

Post a Comment