An Inventory System: Supply Run
In this chapter, you'll pack, carry, and throw supplies in Supply Run. The big idea is an inventory: a small data model for a pack of stacks of items, a screen to show it, and rules for what happens when you click a slot.
I'm still writing this chapter, step by step. In the meantime, you can play the finished game, and read the code and the assets that make it, so that you can run it and change it yourself.
Play the Game
The code that makes it:
The assets, which go in an assets folder next to the game: