Some notes for myself: 07:50 Access as Unique Name allows nodes to be referenced even if they are later moved around the scene tree 08:00 “var variable_name: ClassName = … as ClassName” makes code completion possible in more cases as Godot is more certain of the class
@Maximoose417 Жыл бұрын
This video was great!! I'm trying to get into game dev and this helped me learn lots of neat little tricks and methods and i cant wait to see more!!!
@baconandgames Жыл бұрын
Hi Max! First of all, congrats on getting into game dev. I'm really excited for you. The next video should be out tomorrow (or very soon thereafter) so keep an eye out. And thank you very much for the kind words!
@scott_itall8638 Жыл бұрын
Web Dev getting into Godot, this is some very helpful stuff. Completely different way of thinking when it comes to game logic. Sub'd
@baconandgames Жыл бұрын
Welcome and thank you, Scott! I’m here if you have any questions at all. We all learn from each other in this industry.
@Yoni123Ай бұрын
Scaling the ui and especially bigger font for the code would help for those of us with a small second screen. Also don't leave the mouse on top the code, obstructing it
@baconandgamesАй бұрын
Thanks for the feedback. This is the very first video I did. I’d like to think I’ve come a long way since then.
@kardrasa10 ай бұрын
Awesome tutorial! One thing that confused me is why time_between_moves is 1000.0 I get that it represents a counter, I guess its miliseconds, but I dont remember you mentioning it. Cheers!
@baconandgames10 ай бұрын
It is and perhaps I didn’t. Oops 😬
@ubach__11 ай бұрын
This video is very helpful!! But one thing, unlike in your video, in my editor I don't see anything like ':float' or '-> void' in the lines declaring the function. Is it okay to leave them as they are or is it better to modify them like yours?
@baconandgames10 ай бұрын
I like to give everything a type because it's a way to document my intent as I go, which is helpful to my future self as well as others with whom see my code one day. But it's especially powerful because declaring types for your variables, arguments, and returns will assist Godot in catching errors for you. Imagine you have a function called apply_damage(x) where x is an integer. Everything using that function always passes an integer. Then one day you decide, I need this to be more robust, and you decide you want to pass something more complex into apply_damage() - maybe you want to also pass along stats about the attacker so you can change the damage amount based on some attribute of the attacker. When you start passing something more than an integer, you game will crash when it tries to operate on something as an integer that isn't... but if you type the argument apply_damage(x:AttackData) - every use of apply_damage() in your code that is still passing an integer will light up without having to run your game to get a crash and you'll be able to fix everything fairly easily. This of course is extra tru if what goes into apply_damage() is coming from some other function that's returning something that's been typed... e.g. calculate_damage() -> AttackData. While Godot WILL do its best to figure out data types if you don't declare them, the less you tell Godot about your intent, the less intelligently it can assist you in finding errors in your code and the harder it will be for your future self or others to read. Statically typing return types and variables also gives you code suggestions in the editor, which is not just a time saver but also a form of pre-debugging because if you start typing and you're not getting the suggestions from Godot that you expect, you'll notice your mistake right away. Return types that aren't typed and so on will not be able to assist you in this way. I loosely cover this in one of my videos but I forget which one... anyhow, great questions and thanks for watching! Hope this helps!