This is the third and final chapter of the Godot simulation game course.
This series is a follow-up on the previous chapter, where we implemented a grid-based inventory system.
We’ll be proceeding from there and cover the following:
As always, we welcome feedback and questions. You can leave them directly under any lesson on the platform.
You can find the fully completed project on the Godot 2D Builder repository.
You can also find the starter project for the chapter inside the course’s downloads, start-project-3/
. It contains the result of the previous chapter if you need to skip ahead.
To implement the features, we’ll use the following structure as a guide.
The GUI
node will be responsible for the new crafting GUI and the tooltip that appears when hovering over objects.
It still acts as a gateway for the inventory and input to minimize coupling.
We’ll keep crafting simple.
The crafting GUI will analyze the contents of the player’s inventory and provides a list of objects they can craft. If the user clicks on one of those, the player crafts the item, puts it into their inventory, and consumes the source materials.
We’ll introduce new components and systems for entities.
The GUIComponent
will act as a container for the machines’ GUI to provide machines with inventory and any crafting interface.
We’ll treat it like the quick-bar. It’ll jump in and out of the inventory window to display itself to the player.
The WorkComponent
and WorkSystem
function like the PowerSystem
with its PowerSource
and PowerReceiver
components.
They do general work that the entity can use to function, like crafting items automatically following recipes. For example, turning ore into ingots.
In the next lesson, we’ll add the information label and provide a function inside of entities to get information when the user mouses over anything.
Let’s get cracking.