Title
Summary
Timeframe: ~20 hours (02.04.25 - 15.06.25)
Role: Developer
Skills: Programming, Game Design
Engine: Unreal Engine
Language: Blueprints
Teamsize: 1
Website/Download: Showcase video. Repository is coming soon.
Description: My goal was to create a simple inventory system.
Story: -
Gameplay/Features: The player has an inventory with 10 free spaces for items. In this demo there are three different items: bread with a stack size of 2, cans with a stack size of 4 and apples with a stack size of 8. If the player is in pickup range of an object it shows a prompt that says what button to press to pick it up, what item it is and how many there are. The player will always just pick up the nearest stack of items. The stack of items will then be picked up, if there is still space in the inventory and split across slots if needed, or just part of the stack will be picked up, if there is not enough space for everything. The player can also press two numbers on his keyboard to switch the items in both slots or just press one number and Q to drop it on the ground. If there is more than one item in the dropped stack it will be visually shown.
Workflow: Every dropped item is a data structure consisting of the item name, the item amount and the item max stack size. The inventory is then just an array of those data structures that can be filled with the items that the player picks up. The pickup range of the player is a sphere collision that regularly checks the surrounding items and just interacts with the nearest one. The pickup prompt and inventory screen are just UI widgets that use info from the items and inventory.
Key takeaways: I found it very interesting to figure out how to create the data structures for the items, make sure the visuals are fitting, store them in the inventory arrays and then spawning them correctly again when they are dropped. It was very fun to create the function that checks how the items that the player wants to pickup should be placed in the inventory. It was also hard to choose a direction of how all the different systems should work as I did not have a game to base it on. In the end I just made it a mix between Minecraft and The Legend of Zelda: Breath of the Wild. I also learned a bit more about how to create UI.
What I would do better next time: I may work more on this project in the future. Some things I would consider adding are crafting, a taskbar and equippable and usable items.