WhileIterating's game – Devlog
A daily devlog documenting my journey building a turn-based RPG, with many other elements mixed in for fun, in Godot
Project maintained by Brhando
Hosted on GitHub Pages — Theme by mattgraham
🪵🌿 Devlog Day 17 — Centralizing the Systems (June 12, 2025)
âś… Progress Made
- Finished building out the Unified Item Data System:
- Created
ItemType
enum to cover all item categories I’ll need.
- Built
ItemData
to handle full item properties: names, stack sizes, icons, prices, and descriptions.
- Set up
ItemDatabase
as a global singleton where all item data lives.
- Fully hooked it into my existing inventory, gathering, and merchant systems.
- Completed the Merchant Inventory System:
- Added
MerchantInventory
class to handle individual merchant stock.
- Built the
MerchantManager
singleton to load and store merchant inventories.
- Created two example merchants: “Doc” and “Generalist” with appropriate item lists.
- Refactored resource gathering to finally clean up all that duplicate code:
- Created
HarvestableResource
as a generic base class.
- Simplified both
Tree
and Boulder
to inherit from the base class with just 1 line of code.
- Used exported variables to easily assign resource type, amount, and health directly in the editor.
- Updated Inventory UI to fully connect to the centralized item data:
- Inventory icons now dynamically load directly from
ItemDatabase
.
- No more hardcoded icon paths — it’s all unified and flexible for expansion now.
- Squashed a small issue with icon loading after updating my singletons (forgot to reload the autoload — classic Godot moment).
âš Challenges
- Ran into a null reference error when the icons weren’t loading. Turned out to just be me forgetting to reload my updated global.
- Took things a bit lighter today due to poor sleep last night — shifted focus into system cleanup and polish instead of adding new mechanics.
🚀 Next Steps
- Start work on the Shrine Sacrifice System (third major system that will tie directly into the economy loop).
- Once Shrine is done, I’ll have a functional merchant-shrine-crafting economy to build off of.
- Slowly start migrating any older systems over to the new unified item structure as I revisit them.
đź§ Reflection
Even though this was technically a “light” day, I got a lot of important cleanup and architecture work done that’s going to save me headaches down the road. Centralizing item data was one of the best decisions I’ve made so far — it’s already making adding new systems so much smoother. Every piece I refactor like this makes future systems faster to build, easier to debug, and way more maintainable long-term.
Very happy with how much cleaner my codebase is starting to feel.