Signals in Godot are Amazing!

25,583
0
Published 2023-08-03
Follow Me on twitch: www.twitch.tv/chaff_games

In this video I show you the fundamentals of using signals in Godot. I will give you some Godot tips and trick to help you improve your use of Godot signals.
Signals in Godot are truly amazing!
In Godot, Signals allow the nodes in your scene to easily communicate with each other without requiring a direct reference to one another. You can do some seriously amazing thing in the godot game engine. And in the new Godot 4 signals have become even better. So sit back and learn all that they can do.

Get the FPS Template Here: chaffgames.com/fps-game-template/

Join The Discord: discord.gg/Aw9bvSeSwX

Support the Channel: www.patreon.com/ChaffGames

My Latest Course: www.udemy.com/course/building-a-better-jump-in-god…

My Set Up:
VO Mic: amzn.to/3QfnL6d
Audio Interface: amzn.to/46MFidg
CloudLifter: amzn.to/49dMUqE
Camera Mic: amzn.to/4980cFh
Case: amzn.to/46JiTxi
CPU: amzn.to/471Jeah
GPU: amzn.to/3si8r0G
Keyboard: amzn.to/3tPL6nC
Mouse: amzn.to/46KhM0h

As an Amazon Associate I earn from qualifying purchases.
---------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
Please like and Subscribe! It's truly appreciated

#GameDevelopment #GameJam #Godot

Links to my Socials

Instagram: www.instagram.com/chaff.dev/
Twitter: twitter.com/ChaffDev
Itch.io: chafmere.itch.io/
Website: chaffgames.com

All Comments (21)
  • @Chaff_Games
    What Feature should I cover next! Comment Down below and I'll the most liked one!
  • @infinitenex8165
    Regarding your last cable metaphor, Id say a signal is more like yelling from one room, and someone listens in another. You dont really care who listens and dont have a specific cable going there. Whereas a function/method with a known reference is like the cable, having a set start and end point that can be traced.
  • @tomsterbg8130
    I come from Roblox Studio so I know just how crazy good events are, but making them in Godot is much easier and more intuitive once you get it. Thanks for showing this!
  • NGL that was exactly what I wanted and I'm so glad you uploaded this video, thanks a lot. My suggestion for the next video would be Control nodes, the way they scale is confusing as hell.
  • @Cadaverine1990
    Problem with signals is I need to know what node I am connecting to. At that point it is a glorified list on the main object that has a bunch of delegates. I would rather have a static or global list that I can subscribe where ever and have no care in the world who calls it.
  • @Niknokinater
    Having switched from BO3 modding, moving to singleton function libraries & storage in Godot, to now getting serious with signals, I'm definitely a bit surprised the concept of a 'global event bus' isn't implemented by default, at least to my knowledge. BO3's version of a signal system (notify (the signal event), endon (end current function if node receives specified signal), & waittill (allow node to resume upon signal if waiting)) one is able to specify things like "level waittill(, [sender_capture]);", & "level notify();" as opposed to self / specific_object waittill(, [sender_capture]);" and "that_specific_object notify();" respectively. Cross-node, cross-script, no outright defining functions or receivers at all. Just single-line notifications. Edit: Where Godot's signal system may be connecting cables to & from defined ends, BO3's has the additional ability to be a bunch of vague people standing in various rooms & one guy yells, alerting everyone who was told to stand in that room & it'd be pog if this could become a standard reality in Godot, as great as it is.
  • @RedEyedJedi
    I had major Déjà vu just watching the first 15 seconds of this video.
  • @DileepNow
    I think the most convenient way of using signals is to have the signals be emited from an autoload. Let's say the autoload is called Sgn. If player got damaged, the player it will emit a signal like Sgn.emitsignal("healthchanged",new_health). The health bar which could be anywhere in the Hud scene structure can connect to the signal and work as intended.
  • @luism9886
    I dislike the hype that signals get. I'd rather use global variables. It is extremely rare the cases where I need to use a custom signal. Example, you hit the target and need to notify the UI. There is only one UI in the game, I have the UI declare itself as the only UI on the game, so in it's "_ready" function we have "Globals.ui = self". Then the bullet hits the target, when the bullet enters the body I call right there: Globals.ui.update_bullet_hit(). It's that simple. There's no get_node(../) shennanigas. There's no declaring a signal. There's no signal emit. There's no signal connect.
  • @agriasoaks6721
    Question, Sensei ☝️ You said signal is the way nodes to communicate to each other without reference, but from very little thing I know as we try to connect to emitted signal, we still need to write the "connect" using the emitter name, for example: Head Node(Emitter) Signal took_damage(amount) emit_signal("took_damage", 999) Body Node(Listener) onready var head_node = "head_node path" func _ready(): head_node(emitter).connect("took_damage"(signal name), self(target), "calculate_damage"(function that reacts to the signal)) Or did I miss something? Please, answer 🙏
  • @DillBee
    Just found your channel, great reasource for those learning godot :) Little editing glitch at the start with the repeated line but overall great
  • I don't quite understand what do you mean by you don't need a reference to a specific Node to connect the signal. Kinda yes... You don't need in the code. But you still need a reference through the signals inspector. Anyway you bind together two entities. Yes, not through the code but they are still bind together through Godot. I though the idea of signals is that some entity creates signal and all other entities can just subscribe to signal through some abstraction. I mean without binding anything anywhere. One entity invokes signal and the other listens to it by the signal name or id or something.
  • @malsypright
    Is it possible to send a signal to a node in another scene?
  • @shanefoster5305
    I like this video for showing what it can do... but it would be better if it showed how to do it more in depth.
  • @Soroosh.S83
    signals more like Sometimes I want to bang my head to the wall 😩 every single time I made one it get even worse and more complex 😭
  • @sibotime
    When I saw signal ... signal ... signal ... signal ... signal ... signal ... signal ... signal ... signal ... signal ... signal ... at the top of the code file, I started to have ~questions~ lol
  • @sainteven8181
    I hate that they implemented them with strings. So much unnecessary overhead, if you use alot of signals and it is just stupid.
  • @Assortment54321
    This seems unnecessarily painful imo. Perhaps I just got to get used to it.
  • @gonderage
    Honestly, signals are the one thing that I think are a downgrade since moving from Unity. There's still coupling between nodes because either doing through the inspector requires you to have both nodes in the same scene, or doing it from code requires a hard reference to the emitter. Back in Unity, you simply have an object emit an event, and other objects just subscribe to the events without any referencing to the emitter.