Тёмный

Optional Parameters Are More Powerful Than You Think | Godot Engine Tricks 

PlayWithFurcifer
Подписаться 43 тыс.
Просмотров 7 тыс.
50% 1

GDScript allows some wild maneuvers that are really helpful. We explain 3 odd features that Godot's scripting language offers, including optional parameter tricks and overriding functions.
Wishlist our action roguelite Furcifer's Fungeon: store.steampow...
Our Twitter: / tweetfurcifer
Our discord server: / discord

Опубликовано:

 

17 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 43   
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
What Godot things would you like us to cover?
@SaiponathGames
@SaiponathGames 2 года назад
Never use semicolons to squish multiple lines into one. It's against GDScript Style guide
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
@@SaiponathGames Only a Sith deals in absolutes.
@bogi1
@bogi1 2 года назад
@@SaiponathGames There are situations where it's better.
@SaiponathGames
@SaiponathGames 2 года назад
@@PlayWithFurcifer what do you mean?
@aneerudh1712
@aneerudh1712 2 года назад
Could you please make tutorials on saving system, knockback and cut scene system or camera moving system for like complete beginners? If you can't then please make a complete tutorial on tweens for complete beginners. Thank you.
@KlausWulfenbach
@KlausWulfenbach 2 года назад
"This week, instead of 10+ Tricks We Wish We Knew Already, here's one astoundingly useful trick."
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Pretty much this :) We wanted to do another video like this at the same time, but the booster kinda hit us ...
@TheInterDan
@TheInterDan 2 года назад
This.. . just blew my mind. Amazing tip!!
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Thank you very much!
@Dark_Peace
@Dark_Peace 2 года назад
I just watched all you last vidéos and every single one made me go "YOU CAN DO THAT ??". Thank you for your vidéos, I learn more on your channel than anywhere else. The particles tricks in particular will be helpful as I'm gonna go in polishing mode to release the démo of my game (hopefully) next month. ^^ (I say hopefully because the game trailer on my channel says 2020 and uh...)
@SkinnerSpace
@SkinnerSpace 2 года назад
Nice tricks! It's almost like cooking scrambled eggs. At first, your think like you know how to do it but then you suddenly find someone who knows how to use optional parameters and override methods which makes your code much cleaner and sophisticated!
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Thank you :D Your games have an amazing sense of humor by the way, i never saw such a brutal castle before!
@SkinnerSpace
@SkinnerSpace 2 года назад
@@PlayWithFurcifer Thanks! The Brutal Castle was born out of the limitations of my skills (just a bunch of boxes which is quite easy to animate) and my love of mixing cuteness with brutality)
@Dudex11a
@Dudex11a 2 года назад
Didn't know that semicolon one, thanks for all the tips!
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Yeah, we just found out about that one a week ago. :D
@whiteshampoodev
@whiteshampoodev 2 года назад
oh, i didn't know i can use functions in optional parameters. nice, thx!
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Glad there was something new for you :D
@jonahdevs
@jonahdevs 2 года назад
This is super useful! More of these please :D
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Okay :)
@ShakilAhmedPalatok
@ShakilAhmedPalatok 2 года назад
Up until now I didn't know this awesome powerful stuff, Thanks for the video
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Glad it was helpful! :D
@Dark_Peace
@Dark_Peace 2 года назад
Tip : I found out that yesterday, you gotta talk about it : export variables in catégories that you can fold / unfold. Like in the inspector. There's 2 ways of doing it and it's kinda advanced so I won't détail here but you have to override the Godot set_poperties method with your own exported variable. Tutorials on that exist on Ytb and stackoverflow but are hard to find and most people who don't know about it will tell you it's impossible.
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Thats interesting, we will look into that
@ShadeKirby500
@ShadeKirby500 11 дней назад
The Semi-colon thing blew my mind. Never knew that.
@G69G71
@G69G71 Год назад
Looks like a professional tips for gdscript, that also is a unpredictable language, I enjoy to see the awesome things that godot can do for a game dev.
@nincompoop17
@nincompoop17 2 года назад
Golden nugget yet again :D
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Thank you :)
@L4Vo5
@L4Vo5 2 года назад
Kind of the opposite of the semicolon thing - could you explain how using the \ character at the end of lines works? I saw it in some code, but couldn't find documentation so I'm not entirely sure how it's used. All I know its that it's something about\ being able to cut lines in the middle of expressions, but that's something you can normally do if they're surrounded with ()? so what gives? 🤔
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
I think you got it right. You can use \ for cases where you can't use ()
@Smaxx
@Smaxx 2 года назад
In short it's just "ignore this following line break". In a language with line terminators (like semicolons in C/C++) a new line would be ignored. But since new lines in GDScript have a meaning for instructions/code flow, you can tell the parser to ignore it and just go on continue. And as far as I know you'd only need them if it isn't obvious there should be more (like a bracket that hasn't been closed).
@asdaaaaaaaaaaaaaasd
@asdaaaaaaaaaaaaaasd 2 года назад
great
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
Thanks!
@DejaimeNeto
@DejaimeNeto 2 года назад
yes
@adamcromwell
@adamcromwell 2 года назад
What's worth mentioning here is that you should never, ever put optional arguments in front of required arguments when defining a function
@PlayWithFurcifer
@PlayWithFurcifer 2 года назад
I think that would not even be allowed by gdscript...
@alexanderwurfl2879
@alexanderwurfl2879 9 месяцев назад
but when i add the second arg, i have to call it somewhere else?
@yell9140
@yell9140 2 года назад
👍
@SaiponathGames
@SaiponathGames 2 года назад
Good tips, except for the last one.
@JonathanTash
@JonathanTash Год назад
GDScript supports semicolons!?!? 🤯
Далее
10 Things We Wish We Knew EARLIER (5) | Godot Engine
5:21
25 Gamedev Tips for Everyone
15:00
Просмотров 12 тыс.
AI can't cross this line and we don't know why.
24:07
Просмотров 559 тыс.
We made Vampire Survivors BUT in 10 Lines of Code
7:08
My Experience Moving to Godot from Unity
16:54
Просмотров 23 тыс.
2 Years Of Learning C | Prime Reacts
22:24
Просмотров 285 тыс.
13 ADDONS to SPEED UP your game creation in GODOT!
11:23
Compilers, How They Work, And Writing Them From Scratch
23:53
BETTER 2D visuals in 7 EASY TIPS
10:38
Просмотров 69 тыс.
Threads | Godot GDScript Tutorial | Ep 27
12:16
Просмотров 16 тыс.