New Inventory System #59

nwinter opened this Issue Jan 3, 2014 · 2 comments


None yet

2 participants

nwinter commented Jan 3, 2014

Along with issues like #48 and #49 to make the item collection/transfer animations cool, we'll also want to add a new inventory display and to improve the support for managing objects in an inventory.Collects Thang's inventory.


If you add inventory to a Thang's ui.Selectable Component's extraHUDProperties configuration:

screenshot 2014-01-03 14 38 45

--then you'll see something like this when you select that Thang in the level:

screenshot 2014-01-03 14 42 00

So we have a rudimentary inventory display already, but it doesn't have icon support for the things in the inventory, and it's way too small to make a core part of gameplay. So one thing to do would be to add icons there. Another thing to do, perhaps later, would be to make a separate visual interface for these things to give them the proper weight; I can suggest implementation details if someone suggest a visual design.

Inventory Mechanics

Right now, the inventory property of an inventory.Collects Thang is just an array, and in that array are the id strings of inventory.Collectable Thangs that the collector has collected. That's it. All the logic on top of that is a total hack. Also, when a collectable Thang is collected, it assigns its collectableProperties to the collector--you can see the code for that in inventory.Collects. It's just a hack to get potions to work.

We should improve/replace all that code so that we can do things like reference actual Thangs which have been collected, have logic for what it means to have various Thangs in one's inventory, and extend collection to also include dropping / transferring / using / combining collected Thangs.

gosnat commented Jun 3, 2014

Now that dropping has been added to the inventory system, if you want to pick a thang up, move to a new position, and then drop the thang, the thang must have both the Collectable component added, but also the Moves component (or else the new position is never registered).

Should it remain this way (which should then be documented or added as a dependency), or should the Collects component added "pos" as a tracked property of any thang that is dropped?

nwinter commented Dec 9, 2014

We haven't really needed any inventory system extensions for a year, so closing this–the levels I want to make don't need it.

@nwinter nwinter closed this Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment