The project runs on a single layout split into three layers – the 'game', a layer to display some text and the inventory itself. On the game layer, sits the player object and the item boxes used to add items to the inventory. The text layer is simply a 0% parallax layer to show the player what item they’ve picked up. The inventory is stored on its own layer so that it can be called when it's needed, the rest of the time it's invisible.
The player object is simply a square sprite with the tile movement behavior. The item boxes are also square sprites, however, these are static and have several instance variables to define what item(s) is stored within them. There are two variables to define the item itself, ItemID and Item Name – both the string and numeric ID are needed for separate things. There's a variable to define which category the item belongs to and one to define how many of the item are in the box. When the player picks up an object, a text object will be made briefly visible to show what’s been picked up, before fading out.
The inventory itself is made up of several different objects. Laid out on a background are twenty ItemSlot objects which act as the slots for the inventory. On the right-hand side is an item description box as well as a display slot to show a larger image of the currently selected item. The current inventory category is shown above the item slots.
The ItemSlot object has a couple of instance variables assigned to it: SlotID and ItemID. SlotID is used to determine where the cursor should sit (in conjunction with the CurrentItemSlot global variable) and ItemID tells the slot what item is currently in it. A lot of the other objects are cosmetic, aside from the text objects. The text for the item name and description is set from the JSON file which stores all the item information, while the number held text object uses the dictionary object.