Tag: godot

Procedural geometry in Godot

As another part of my Godot explorations, I’ve learned how to generate meshes. My goal was essentially to port over my dungeon generation code from Unity, what I explained in detail in this tutorial I wrote years ago. Now I’ll explain how to do the same thing in Godot!

Continue reading “Procedural geometry in Godot”

Godot Explorations

As implied by my post last month, I’ve been testing out Godot as another development option. I’ve been finding pros that were both unexpected (at least to me) while the cons are being addressed. On the other hand, after they partially walked back their unwelcome new fees, I think I’m going to keep using Unity for my next hobby game.

Continue reading “Godot Explorations”

Decoupled (pub-sub) messaging system in Godot

This is an explanation for how to make a decoupled messaging system using the built-in “signals” mechanism. I just started learning GDScript to do programming in Godot, and it isn’t taking me long at all. I quickly realized “signals” are a nice way of handling events, but have the downside that the object receiving events needs to know about the object that sends events. This level of coupling is fine in many situations, but a truly decoupled system (where neither the sender nor receiver know about each other) would often be even better, so I devised this simple approach to doing that.

At a high-level, you make a script with a list of your signals in it, and then set that script to Autoload (making sure Global Variable is enabled, to get the convenient variable name). In other words, something like this in the Project Settings:

Continue reading “Decoupled (pub-sub) messaging system in Godot”