Drinking Mechanic + Inventory
Ended up having to restart my work from scratch, after tinkering around with it, but that’s to be expected. I’d assume for every iteration I create, it’s likely that I’ll need to redo the whole thing to better set it up for success / scalability, though there’s also the need to just finish it. I was given the advice by a senior tech artist / game developer to just code it through, and then hire a senior developer to redo the whole thing, which I also agree with.
But anyway, I figured out how to create the drinking mechanic and inventory system!
It comprises of these parts:
a hydration bar
inventory panel
empty / full water bottle
ability to fill up water at a water source
ability to increase hydration either at the water source or by clicking on the full water bottle
a hydration reduction system over time
Was able to hobble together these parts through the combination of ChatGPT and (mostly) JetBrains AI Pro (that came along with Rider IDE). It’s super simple, yes, but my general approach is to start simple, and keep adding things onto it. Sometimes when you have nothing, it’s best to encourage yourself by taking on bite-sized incremental pieces.
Clip of drinking & inventory mechanic right below:
This video shows the player activating inventory system, filling up empty water bottle, and increasing their hydration bar (fulfilling thirst) in the upper-left corner.
As you can see, the mechanic is fairly straight-forward. Next, I’ll be working on allowing the player to gather material for a fire and to cook a stinging nettle tea. Drinking the tea will satiate the player’s hunger and increase their temperature.
These are the basic mechanics before I add onto them, e.g., including a water filter, figuring out how to make a “make a fire mini game”, etc.
Will be keeping you guys updated -
Note: Graphics are imported via Tiny Wonder Farm and the “water bottle” (potion glass and filled potion) came in from Admurin’s Item Pack. These are mostly just placeholders for now as I figure out the game mechanic. Once that’s done, I’ll populate the art with my own style.