To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/CashewOldDew/ . You’ll also get 20% off an annual premium subscription
I came here from twitter, thank you for bringing up the question and striding to answer it. I've personally learned a lot of valuable syntax, very neat video.
Since Delta is a really small number, it does, indeed, make the rotation amount smaller. However, since there was no need for framerate independent movement in this case, I didn't want to complicate the example 🥜
10:35 I believe there's a small error, because the peanut actually gets printed right _before_ `process` is processed. Another thing to note is that, connecting each frame with CONNECT_ONE_SHOT, whilst emitting the signal each frame as well is inadvisable. It is better to simply connect once, perhaps in `_ready`, but this does change the behaviour slightly, as it prints before the very first frame as well, whereas in yours it skips the 1st frame, and starts printing before the second one
Regarding the process_frame signal, that is a very good observation. The docs really say that the signal is emitted right before the next process frame. So, in the example, the first frame was executed, and, right before the next frame, a peanut was printed. It is true that if I would've had called the signal binding in the ready function, a signal would've been emitted right before the first frame, printing the peanut first.
And yes, connecting a signal each frame would not make too much sense in a real scenario. For demonstrative purposes, I just wanted to do that each frame to showcase that there was no desynchronization between the prints, as in, the peanut always grts printed right before the next frame. Thanks a lot for the comment! It really shows that you have a good understanding of how this works! 🥜
What a timing yt recommend this video, yesterday I was struggling with this error then after so many tries I got it working and today TH-cam is recommending me this video 😮😂
Actually I was getting errors in godot telling me to use this when I set colliders to disabled but when I used call_deferred (or rather set_deferred) the behavior was wonky and when I just did collider.disabled = whatever then it worked well. Would you say it is alright to just ignore the errors?
It could be that wonky behavior came from other functionality in your code. I would personally take those errors into account! An added benefit to fixing them would be easier debugging and logging as your console would be less cluttered without them. 🥜
I use call_deffered when procuderally spawn ui elements. like active selected tabs do not shown as selected if you didin't use deffered call to activate it and such other UI cases.
There are a lot of cases in which you would want to call functions, get values, etc. in the current frame. Call_deferred is an alternative for special cases in which doing something immediately could break the game.
To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/CashewOldDew/ . You’ll also get 20% off an annual premium subscription
Man's answering Questions ive kept in the back of my mind without even realising
I came here from twitter, thank you for bringing up the question and striding to answer it. I've personally learned a lot of valuable syntax, very neat video.
Thank you so much! It is great to see people joining in from other platforms. I'm very happy it helped you! 🥜
Very good video! I hope to see more!
5:38
for the `rotate` function in `_process`, instead of decreasing the `rotation_amount`, it's better to multiply it by `delta`
Since Delta is a really small number, it does, indeed, make the rotation amount smaller.
However, since there was no need for framerate independent movement in this case, I didn't want to complicate the example 🥜
You can also avoid those warnings by connecting in a different lifetime function that doesn't run more than once, like _init()
10:35
I believe there's a small error, because the peanut actually gets printed right _before_ `process` is processed. Another thing to note is that, connecting each frame with CONNECT_ONE_SHOT, whilst emitting the signal each frame as well is inadvisable. It is better to simply connect once, perhaps in `_ready`, but this does change the behaviour slightly, as it prints before the very first frame as well, whereas in yours it skips the 1st frame, and starts printing before the second one
Regarding the process_frame signal, that is a very good observation.
The docs really say that the signal is emitted right before the next process frame. So, in the example, the first frame was executed, and, right before the next frame, a peanut was printed.
It is true that if I would've had called the signal binding in the ready function, a signal would've been emitted right before the first frame, printing the peanut first.
And yes, connecting a signal each frame would not make too much sense in a real scenario.
For demonstrative purposes, I just wanted to do that each frame to showcase that there was no desynchronization between the prints, as in, the peanut always grts printed right before the next frame.
Thanks a lot for the comment! It really shows that you have a good understanding of how this works! 🥜
What a timing yt recommend this video, yesterday I was struggling with this error then after so many tries I got it working and today TH-cam is recommending me this video 😮😂
Next time I'll upload 1 day earlier! Ha ha 🥜
Hey, Love your tutorials, any chance you could cover how to set up multiplayer in Godot?
Thanks for the great idea! I'l add it to the list! 🥜
Actually I was getting errors in godot telling me to use this when I set colliders to disabled but when I used call_deferred (or rather set_deferred) the behavior was wonky and when I just did collider.disabled = whatever then it worked well. Would you say it is alright to just ignore the errors?
It could be that wonky behavior came from other functionality in your code. I would personally take those errors into account! An added benefit to fixing them would be easier debugging and logging as your console would be less cluttered without them. 🥜
I use call_deffered when procuderally spawn ui elements. like active selected tabs do not shown as selected if you didin't use deffered call to activate it and such other UI cases.
so if call_deferred is always preferred, it should just be default ._. what are actual use cases of not using call_deferred?
There are a lot of cases in which you would want to call functions, get values, etc. in the current frame.
Call_deferred is an alternative for special cases in which doing something immediately could break the game.
Gonzalez James White Thomas Garcia Timothy
Same
god
That's precisely how you write 'dog' backwards! 🐶
You are my ddsh