Posted May 17, 2024 by BriocheVanilla
#godot #graphedit #crafting
Welcome to the first ever devlog for Delicious Dungeon! I’ll be sharing weekly updates on our progress. Let’s dive in!
Delicious Dungeon is a dungeon crawler heavily inspired by the anime Dungeon Meshi. In this game, you’ll interact with dungeon dwellers, learn their culinary preferences, and prepare dishes to help you advance through the dungeon.
For this first devlog, I aimed to tackle something straightforward—or so I thought. To make development manageable, I split the game into smaller chunks. Given the importance of crafting in our game, I decided to start there.
The crafting system’s simplest form is reminiscent of Little Alchemy, where players combine components to create new items (e.g. Fire + Water = Steam). A tree structure is perfect for visually representing these connections, avoiding the complexity of massive JSON structures with arbitrary IDs.
Godot’s GraphEdit is our tool of choice. It allows us to create nodes and connect them, forming a neat relational model that we can export as JSON for the game.
Each GraphNode holds information about its ingredient (title, description, and component UUIDs). A Popup node allows users to edit this information.
edit_node
signal calls _on_edit_node_request()
, passing the relevant node UUID.ingredient_updated
signal (on_popup_edit_confirmed),
updates the GraphNode's text boxes with the new information.Displaying data is all well and good, but it doesn't really benefit our game in any way. So, to make our application functional, we need to export and import our crafting trees:
With the basics in place, I plan to expand the system to allow ingredients to inherit properties like flavours from their components, creating greater ingredient variety.
I hope this wasn’t too technical! Feel free to ask any questions below. I’ll be uploading the project to GitHub after a few adjustments.
- See you next week!