Тёмный
No video :(

Save Countless Lines of Code With Animations in Godot 

GDQuest
Подписаться 263 тыс.
Просмотров 92 тыс.
50% 1

Get the 4 free Godot Node Essentials guides: www.gdquest.co...
You can get Godot Node Essentials at a combo discount with the Learn to Code From Zero course on Kickstarter (only until October 31): kickstarter.co...
---
👥 CREDITS
Host: @Bramwell Williams
Video edited by Nesi: / nesiawesomeness
Godette design CC-By 4.0 Juan Linietsky and contributors
---
💌 JOIN US
Come chat on Discord: / discord
Follow us on Twitter: / nathangdquest
---
📝 CC-BY LICENSE
This video is licensed under the CC-By 4.0 license: creativecommon...
You can attribute it to "CC-By 4.0 - GDQuest and contributors - www.gdquest.com/"

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

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 93   
@ishdx9374
@ishdx9374 2 года назад
genius, i always thought there was something i was doing wrong when i had several timers and tons of deltatimes, i didn't know animation players could call functions, awesome stuff
@Fredo22
@Fredo22 2 года назад
Fellow deltarune fan
@whiplasher1599
@whiplasher1599 2 года назад
If you were using those timers just to pause your scripts for a little bit you can do the same thing in a single line of code by using the yield function and creating a timer within it
@ishdx9374
@ishdx9374 2 года назад
@@whiplasher1599 that would block though, it gets more cumbersome if i need more animations running
@dugtrioramen
@dugtrioramen 2 года назад
@@ishdx9374 you could just put the yield in a separate function, and that function would yield instead of the main one. But animation player is still better
@industrialdonut7681
@industrialdonut7681 2 года назад
@@whiplasher1599 that is disgusting
@helianthe3457
@helianthe3457 2 года назад
YOU CAN DO THIS BY ANIMATION???? This is a game changer ngl. Thank you!
@aurorapaisley7453
@aurorapaisley7453 10 месяцев назад
hehe.. a game changer
@giggling_stars
@giggling_stars 2 года назад
Me, an animator: Wonderful! Time to make an entire game with just animations
@BlenderKiel97
@BlenderKiel97 2 года назад
Animation system in Godot is crazy! I had no idea it is capable of such things!
@Theraot
@Theraot 2 года назад
This was there when Godot went open source. It was never news, so it is rarely covered.
@BlenderKiel97
@BlenderKiel97 2 года назад
I know but man it's much better than I imagined
@UsaraDark
@UsaraDark 2 года назад
I've always had some pride when I did animations completely through code, but the fact that you can fine tune the timer is extremely powerful. I messed animation player once in the past, and although a bit tedious to setup, it's so easy to mess with once done so.
@igorthelight
@igorthelight 2 года назад
About pride when you write your own - that's a common thing for programmers :-) You could still write your own modules in Godot. Or just look at sources so you could know how it works.
@noxen1402
@noxen1402 2 года назад
We can call functions in animations ?! You just changed my coding life! Thanks for all the great videos!
@tucutaca2010
@tucutaca2010 2 года назад
I wish I had this video back when i didnt know about animations. This can dramatically speed up your workflow if you tend to do anything by code
@crabscrabscrabs
@crabscrabscrabs 2 года назад
this is one of those things that felt like cheating when i first discovered it, i always assumed there was some unspoken reason to not rig things up through the animation player, but i suppose not! makes me feel a lot better about the "jury rigging" i did to make things work.
@jayarrow4274
@jayarrow4274 Год назад
It's incredible how powerful animations are in Godot. One drawback, in my opinion, is that the code is less readable when you outsource a lot of logic to animations.
@paulsullivan649
@paulsullivan649 2 года назад
Wow. Had no idea you could do so much via animations. 100% spending my evening reworking at least 3 different areas of my game to use this technique. Thank you!
@chacelow2438
@chacelow2438 2 года назад
Just yesterday I was playing around with this idea and started writing my own simple property animator in GD script. Thinking animations were something that only came prepackaged in 3d models. Thank you so much for making this video. Bonus points, it's concise, you're well spoken and you offer helpful examples! Would be great to see if there's any overhead to this approach vs just coding the transformations? When to use animations/animation controllers vs when it's better to code it into the script.
@sterlingsteele1394
@sterlingsteele1394 2 года назад
Omg THANK you for this, I made like 3 whole scenes to just to spawn different effects for the bullet, to keep the sound going, etc, omg ty for this. I am like 2 weeks new to Godot, so this is huge for me.
@PedroBrandesitsme
@PedroBrandesitsme 2 года назад
Wow, here I’m chocked again about how easy godot is! Thank you
@peatral
@peatral 2 года назад
The moment I found this out a year ago (or so) I knew instantly that this is the most powerful feature of godot. Animating function calls, audio, literally every exposed variable, that is just crazy.
@selgesel
@selgesel 2 года назад
Oh wow this changes everything. I've always felt that object lifecycles should be tied to the animations, and I've had numerous shower thought sessions thinking over generic solutions but failing to come up with one. Turns out it was right in front of me!
@soundrogue4472
@soundrogue4472 Год назад
This is cool for those who want to code less; I'll consider this if I want to code less.
@Chevifier
@Chevifier 2 года назад
Ive been using this method to animate Shaders for a while now and calling functions for hack and slash type games combo follow up attack system.(i.e have a function that resets a combo attack if the player hasn't pressed attack for the next chain attack)
@Kaedric999
@Kaedric999 2 года назад
Well I've been mulling over whether to pitch in to the kickstarter and I'll let you know that this video pushed it over the line. Had no idea you could do that stuff, hopefully there's other neat tricks in the course :)
@Speed-TV
@Speed-TV Год назад
0:01 save of
@elrelster
@elrelster 2 года назад
Mmm this was incredibly insightful, signed up for the free guides. Quality content fellas
@idle.observer
@idle.observer 9 месяцев назад
As always, great video, thank you!
@bwah9481
@bwah9481 7 месяцев назад
Such a powerful tool. Thank you
@datmantj7
@datmantj7 2 года назад
Animations is going to be a extremely huge game changer!
@thomasmaier7053
@thomasmaier7053 2 года назад
Nice format, nice and short and useful.
@CyberVi7a
@CyberVi7a 2 года назад
Holy hell I had no idea. This is amazing!
@igorthelight
@igorthelight 2 года назад
You could also connect Signals in Editor, saving another few lines of code. All of that is still code - but it's under the hood now. But it's more clean that way :-)
@whoeverofhowevermany
@whoeverofhowevermany Год назад
When I'm already 30,000 lines of code in 15 doesn't even feel worth mentioning
@Sunny_Lapiz
@Sunny_Lapiz 7 дней назад
Thanks a lot
@nerothos
@nerothos 2 года назад
Yeah figuring out I could scroll my entire level by simply using an AnimationPlayer node kinda blew my mind.
@frankhuurman3955
@frankhuurman3955 2 года назад
Dang this is a gamechanger, amazing!
@alexguy7395
@alexguy7395 2 года назад
This is really cool, time to make an open world mmorpg using the animation player
@zhengistasbolatov8480
@zhengistasbolatov8480 2 года назад
Exactly, my codes lines would be 3-4 times more if I didn't knew about method call track in Animation Player
@anastasiaklyuch2746
@anastasiaklyuch2746 2 года назад
hmm i have an animation question: I have a 2D skeleton body (to animate a character made of bodyparts) and I want to make two such characters embace in an animation, which means some of limbs of one character go behind the second character and others go on top of him. How can I define such layering of bones between characters?
@Thomahawk1234
@Thomahawk1234 2 года назад
I'm not sure I understand correctly but I think you're looking for the z-index of your sprites or textures. Unless you're talking about 3D stuff. I'm not very familiar with 3D.
@Theraot
@Theraot 2 года назад
I'm not sure I understand the problem. However, perhaps the solution is in using remote transform nodes. Try that.
@anastasiaklyuch2746
@anastasiaklyuch2746 2 года назад
@@Thomahawk1234 z-index can be used in 2D animations? Cool, thanks :)
@anastasiaklyuch2746
@anastasiaklyuch2746 2 года назад
@@Theraot Thanks, I'll look into that :)
@pianoatthirty
@pianoatthirty 11 месяцев назад
This is nuts.
@winsomegaming2549
@winsomegaming2549 2 года назад
Animation looks more work than coding really
@punkysuen
@punkysuen 2 года назад
It is super neat solution. But, would it be easier to reuse Animation Player Scenes on other project by code?
@ferdeboergd256
@ferdeboergd256 2 года назад
Really cool and useful! And maybe a bit too fast explanation... 😅
@nanotross537
@nanotross537 2 года назад
Let's say you have a projectile that either splits up after a delay, or that can hit multiple times inside an area as it passes through (like piercing ammo in Monster Hunter). Would this be simpler with code or by making the animation call a function that creates more projectiles? Do animations support conditionals? If not then you'd have to call a function that does the branching logic for you and have that spawn more projectiles.
@Gdquest
@Gdquest 2 года назад
You don't have conditionals so in that case you may use only code or a mix of animations and code. If the bullet needs to do multiple things on impact, you could use an animation just for the impact. You could also get things like making a single bullet scene with different animations for the different kinds of bullet impacts, allowing you to group them all in one place. From code, you'd just have to play the right animation. But yeah it really works only when you have to do a fixed set of things and it involves time.
@dugtrioramen
@dugtrioramen 2 года назад
Too bad animation player isn't good for relative values. So you still have to use tweens and yields for those
@Wuskus
@Wuskus 2 года назад
This is some black magic right here
@angulinhiduje6093
@angulinhiduje6093 Год назад
hey @GDQuest, is this still up to date with Godot 4x?
@realadnoh
@realadnoh 9 месяцев назад
Sorry buddy, but I'll steal this information for my unreal development ;) didn't even thought about putting also game logics inside the animation/sequence - but it makes conversation with artist a lot easier for me as a developer I think
@definite_d
@definite_d 2 года назад
Well, I wasn't surprised; the website does say EVERYTHING can be animated.
@MrEliptik
@MrEliptik 2 года назад
I really need to use the Animation player more!
@NexusBaum
@NexusBaum 11 месяцев назад
super useful for meelee combat 🤔
@simeontodorov9353
@simeontodorov9353 2 года назад
This is so clever!
@asdaaaaaaaaaaaaaasd
@asdaaaaaaaaaaaaaasd 2 года назад
life changing
@Frazer213
@Frazer213 Месяц назад
can you have tracks loop while others dont? I have an animation im trying to create, where a character walks up the stairs, so i have the sprite being animated which is about .24 seconds long. the player moving up the stairs takes 2 seconds. so id like to know if there is a way to get the sprite2ds track to loop to avoid having to map out the entire 2 seconds.
@thomasmaier7053
@thomasmaier7053 2 года назад
What the hell? This is spot on, cheers mate!
@AxZelAnimations30
@AxZelAnimations30 11 месяцев назад
Okay so..... Is this, like, the equivalent of Animation Events in Unity? If so then this is basically what I need.
@wiktorwektor123
@wiktorwektor123 11 месяцев назад
I don't know about Unity, but AnimationPlayer in Godot can animate any property of any node.
@AxZelAnimations30
@AxZelAnimations30 11 месяцев назад
@@wiktorwektor123 yeah I was able to work into it. It is basically like what AnimationPlayer does in Unity. Only problem is that you cannot DragDrop Sprites in it, which is honestly what I was hoping I can do. Some said there's a plugin for that but I haven't tested it yet.
@industrialdonut7681
@industrialdonut7681 2 года назад
This is a really cool tip, but what about testing or previewing it in the editor? Like, I don't think the functions get called when you preview the animation in the editor
@fuzzy-02
@fuzzy-02 2 года назад
*sirens noises* WOOOOOOOOOOOOOO....OOOOOOOOOOWWWWOOOOOOOO! *lazer beam!* pissshoouuwwwwwww *NUCLEAR AIR STRIKE!* KA-BOOOOOOM! ...sorry that beam got into my head lmao
@the_RCB_films
@the_RCB_films 2 месяца назад
yooo what!?!?!?!
@soundrogue4472
@soundrogue4472 Год назад
0:13 why code less?
@999dunkins
@999dunkins Год назад
how do you even make 3d animation with it
@Pirochiro
@Pirochiro Год назад
Is there not still a slim chance of a call track method being skipped if the frame skips for whatever reason?
@Soroosh.S83
@Soroosh.S83 Год назад
Ah hell nah bro 💀 (In that case you can use delta time I guess which work for low and high PC)
@stanislavtkach333
@stanislavtkach333 2 года назад
It's harder to debug...
@rentaspoon219
@rentaspoon219 2 года назад
Is this better though?
@ishdx9374
@ishdx9374 2 года назад
is it not?
@Gdquest
@Gdquest 2 года назад
Moving code to data generally leads to fewer bugs as you can't make typos there. You can edit timings and whatnot. This has advantages at least.
@jonathancamarena3117
@jonathancamarena3117 2 года назад
neat
@NexusBaum
@NexusBaum 11 месяцев назад
WTF! If I only understood, what's happening...
@DarthVader-dm2lb
@DarthVader-dm2lb 2 года назад
Well hello there!
@SpongeRoss
@SpongeRoss 2 года назад
How efficient is this in terms of performance compared to GDScript though?
@Gdquest
@Gdquest 2 года назад
Certainly much better as it's data running through optimized, compiled C++ code. It's interesting to see some people seem to think code would be faster. Animations still use code under the hood. Note that if the animation calls a function you wrote in GDScript, then it'll likely be the same as calling it in GDScript directly.
@SpongeRoss
@SpongeRoss 2 года назад
@@Gdquest I'm definitely going to implement this in my workflow, thanks!
@Gdquest
@Gdquest 2 года назад
As with anything when it comes to performance you should measure the difference. But making the engine do stuff should generally be much faster than using GDScript.
@SpongeRoss
@SpongeRoss 2 года назад
@@Gdquest Thanks again, and congrats on the kickstarter campaign :)
@thegameissimple
@thegameissimple 2 года назад
Except there MUST be drawbacks to this, for example performance wise or something.
@Gdquest
@Gdquest 2 года назад
No, it'll offer more performance compared to using GDScript or C# as it processes the data in native code. The whole animation system is written in C++.
@sslaxx
@sslaxx 2 года назад
No conditionals (so no if statements) or the like, so functions would be necessary for those.
@EROSNERdesign
@EROSNERdesign 6 месяцев назад
Buy this guy a coke!
@StevenRerani
@StevenRerani Месяц назад
I've never clicked on a video so quickly and was immediately disappointed. The suggested video under this one is titled: NEVER CODE WITH ANIMATION PLAYER 😂😂😂 Okay false alarm, just watched the other video. Punctuation and grammar are very important!
@aaush_
@aaush_ 2 года назад
Yo
@hungryOrb
@hungryOrb Год назад
It's Godot, like Robot. Nevertheless, great video!
@soundrogue4472
@soundrogue4472 6 месяцев назад
I do not consider this simpler; it's frustrating to work with.
Далее
How to Make a Good 2D Camera
11:38
Просмотров 399 тыс.
I Made My First Game in Godot in 3 Weeks...
26:21
Просмотров 315 тыс.
Cristiano ronaldo VS Tibo Inshape ! 😱😱
00:20
Просмотров 3,7 млн
Godot 4.3 is Here!
19:20
Просмотров 84 тыс.
I Switched to Bone Animations (here's how it went)
5:56
We made Vampire Survivors BUT in 10 Lines of Code
7:08
Godot 4 / Blender - Third Person Character From Scratch
57:33
When AI Plays Wordle..
21:49
Просмотров 41 тыс.
Jiggle Physics in Godot
13:31
Просмотров 75 тыс.
I made a game using Godot for the first time
7:35
Просмотров 1,2 млн
Seven Minutes to Decide On Godot 4 in 2024
7:36
Просмотров 165 тыс.
How To PLAN your Game as a Solo Developer
16:26
Просмотров 488 тыс.