Це відео не доступне.
Перепрошуємо.

How to animate Sprite Sheets in Godot using AnimationPlayer (beginner tutorial)

Поділитися
Вставка
  • Опубліковано 5 сер 2020
  • In this tutorial, we learn to use the AnimationPlayer node provided by Godot 3.2! AnimationPlayer is a really useful and intuitive tool for creating animations out of 2D sprite sheets. We'll also cover adding layers to a character that animate in sync with the body.
    Our next video will dive a little deeper into more possibilities of this tool. I'll link it here as soon as that video is ready!
    ** Links **
    Download the assets for this video:
    assets.codepen...
    Build full games with me here:
    courses.drewco...
    Join us in our Discord:
    / discord
    Join my Email List:
    us13.list-mana...
    Me on Twitter:
    / drewconley13
    My first game on Steam (Danger Crew)
    store.steampow...
    ** Timestamps: **
    0:00:00: Intro
    0:00:51: Creating the Character
    0:02:05: Sprite Sheets in Godot
    0:03:50: AnimationPlayer
    0:04:45: Frame track
    0:07:40: Adding a hat
    0:09:30: Animating hat position
    0:11:00: Toggling layers

КОМЕНТАРІ • 79

  • @DrewConley
    @DrewConley  4 роки тому +14

    Hey friends, this one is about one of my favorite tools in Godot: the AnimationPlayer! My next game has TONS of character animations in it, and this tool has helped me stay organized and enabled some really cool results.
    Hope you enjoy the video. Can't wait to see the animations you make!

    • @ronolds6505
      @ronolds6505 Рік тому

      Thanks for excellent tutorial! Was wondering if it is possible to copy Godot "code" and insert it into HTML, CSS, and/or JS on my website. ??

  • @NuclearDrone
    @NuclearDrone 3 роки тому +35

    Great job explaining why the hat is useful to put as a separate node. I couldn't find any other videos explaining this core mechanic of 2D games where you need to change gear or sprite textures.

  • @robertd7275
    @robertd7275 2 роки тому +7

    Thank you, I'm just starting out as a hobby and this was perfect explanation of the basic animation effects for pixel sprites.

  • @reactmagic2348
    @reactmagic2348 3 роки тому +25

    Thanks for the video, it certainly helped me. However, I just want to point out that it is unnecessary to create a key for every frame of the animation. Instead, you can change the "update mode" for the track to "continuous", create a key for the last frame of the animation and the first frame of the animation, and the AnimationPlayer will automatically step through every frame of the animation while only specifying a key for the first and last frame.
    When "update mode" is continuous, the player automatically moves between the values of the keys. For a short animation like this one it may not matter that much, but for an animation that is 20+ frames it may save a huge amount of time.
    I think it should be the default for a new AnimationPlayer track, since it often saves a lot of time. Instead, the default is "discrete", which means the property value simply changes to the value specified by the key whenever that key is reached in the duration of the animation track.

    • @Chillerll
      @Chillerll Рік тому +3

      Thanks for clarifying this. This is one of my first Godot videos and I was so close to give up on the engine because this workflow would have taken way too much time to me.

    • @WatsonDynamite
      @WatsonDynamite 8 місяців тому

      this doesn't seem to work anymore

  • @gopherwithagun604
    @gopherwithagun604 2 місяці тому

    Hey. I just wanted to say that I really appreciated how clear this video was. I appreciate your use of examples and also trickling in information only when necessary rather than throwing the kitchen sink right at the start. I appreciated the clear structure.

  • @aguynamedwyatt
    @aguynamedwyatt 2 роки тому +3

    I'm definitely subscribing. I've been trying to get into godot coding but haven't found a good tutorial, and this is the first one I've found. Thank you so much, I hope you get more subscribers and that this isn't the only thing you do. I hope you work for a good game company or other and that you make enough money to sustain yourself. I'm saying this because I really hate to see small youtubers who put lots of effort into videos and don't have many subs.

  • @KnoxEmDown
    @KnoxEmDown 3 роки тому +4

    Thank you for producing such a dense and useful tutorial. Real examples will always be best!

  • @dreamhollow
    @dreamhollow 3 роки тому +1

    His walking animation looks like dancing.
    Also great tutorial! Been looking for a reliable video on Godot animation, thank you sir!

  • @isabellarozalinda6434
    @isabellarozalinda6434 2 роки тому +1

    I finally know how to add those animations I was searching 1 hour how to do this.you explain fast and good everything

  • @DrRumsmuggler
    @DrRumsmuggler 3 роки тому +4

    You're good at this tutorial thing, subscribed

  • @silvernode
    @silvernode Рік тому

    I finally found a channel that teaches me at a pace that works for me in a format that makes sense.

  • @MCNeko6554
    @MCNeko6554 Рік тому +1

    This is 10 times easier than Unity...just...wow. Thank you SO MUCH for this tutorial!

  • @Maltebyte2
    @Maltebyte2 Рік тому

    The loose hat was kinda cool also nice effect i liked it alot! Thanks for these videos!

  • @randompast
    @randompast 2 роки тому +2

    Fantastic, well done, thanks for the tutorial!

  • @SinrMax
    @SinrMax 7 місяців тому

    Drew I want to mention I am not sure if this is something youtube implemented or an option you have as a creator but when you mentioned the word "subscribe" the button next to your name had a little animation pretty cool!

  • @iRaionSama
    @iRaionSama 4 роки тому +3

    Oh no, no beard? lol. In all seriousness let me tell you that your channel is so underrated, amazing content, easy to follow and grasp the concept you're speaking of. Just keep'em coming for us that are following and let's hope that in the near future you'll get the recognition you disearve :D

    • @DrewConley
      @DrewConley  4 роки тому +2

      Thanks a ton for the nice comment. I really appreciate it because these things take forever to put together :D
      And haha - I wasn't sure if anybody would comment on the beard! I'll let it grow out way longer next time and see how it goes.

    • @cynikoSC
      @cynikoSC 4 роки тому +1

      +1 - stumbled on this content randomly and think it's really great - nice work

    • @DrewConley
      @DrewConley  4 роки тому

      hey, thanks so much! I really appreciate it

    • @synthoelectro
      @synthoelectro 2 роки тому

      at first I was thinking 'well you could always add a beard to the char' then I realized the punchline.

  • @conta7619
    @conta7619 3 місяці тому

    Thank you very much ❤❤❤❤

  • @MrSmith_
    @MrSmith_ 2 роки тому

    Thanks for this Drew, it was really helpful.

  • @ahmasa21
    @ahmasa21 2 роки тому

    Perfect explanation
    Easy to understand

  • @phoenixastra4429
    @phoenixastra4429 3 роки тому

    so convenient for multiple outfit and accy games tysm!

  • @archiewise6634
    @archiewise6634 3 роки тому +1

    Thanks i am making an RPG so this helps a lot

  • @FrancoisSchnell
    @FrancoisSchnell 4 роки тому +1

    Very cool, thanks, keep it up. Subed.

  • @jake_mouse
    @jake_mouse 3 роки тому

    Awesome video, thank you!

  • @lexolotlgod
    @lexolotlgod Місяць тому

    I have been running into issue after issue trying to make animated sprite 2d work... Think I'm throwing in the towel on that, lol.

  • @evmcha
    @evmcha 3 роки тому +6

    Thank you for the great vid! I have a question about sprite properties. I'm making a creature breeding kind of game like Pocket Frogs and I want to create sprites that each have three properties, 2 being colors and one for the pattern. Is there a way to somehow create a single sprite sheet and then be able to somehow edit it for individual creatures or will I need to make a new sprite sheet for each combination?

    • @DrewConley
      @DrewConley  3 роки тому +2

      Sounds cool! You might consider layering them? Maybe having the pattern itself be it’s own sprite. The color part may be swappable with Shaders. Best of luck!

    • @evmcha
      @evmcha 3 роки тому +2

      @@DrewConley Thank you!!

  • @RyanScottForReal
    @RyanScottForReal 3 роки тому

    Great stuff!

  • @jacobp9470
    @jacobp9470 3 роки тому

    really helpful. thanks!

  • @Aviv_S
    @Aviv_S 2 роки тому

    Thanks, helped a lot. :)

  • @eboatwright_
    @eboatwright_ 3 роки тому

    Thanks for this! :D

  • @halexp
    @halexp 3 роки тому

    this is AWESOME! ty!!!

  • @hehz7829
    @hehz7829 2 роки тому

    My sprite is moving its coordinates when the frame switches for some reason

  • @nyn2k259
    @nyn2k259 Рік тому

    Nice video, do you have any tutorials on card build deck games with rpg elements? Thanks.

  • @amarion
    @amarion 3 роки тому +2

    hey i have a question! this video was great but why do we create a new scene for the character? Is it for abstraction purposes or did you just do it for this one tutorial? Also, how would we use the character scene in another scene? Thanks!!

    • @DrewConley
      @DrewConley  3 роки тому +5

      Breaking out individual pieces, like the character here, can make large projects much easier to manage and edit. It’s your call on when to move something into its own scene. I try to keep my scenes pretty small with isolated responsibility.
      Look up ‘Instancing Scenes’ for using existing scenes within other scenes. Thanks for the comment!

    • @amarion
      @amarion 3 роки тому +1

      @@DrewConley thank you so much! i feel like i understand godot so much more than i already did before. youre amazing!

  • @izichgt6803
    @izichgt6803 3 роки тому +1

    Can u give me the every picture its hard to crop in phone i just have phone

  • @Darkyahweh
    @Darkyahweh 2 роки тому

    Where is part 2?

  • @amiasakawa5353
    @amiasakawa5353 3 роки тому

    thank youu

  • @tonypatino1765
    @tonypatino1765 4 роки тому +2

    I'm interested in game dev, i'm currentlyonly on episode 2 though

    • @DrewConley
      @DrewConley  4 роки тому

      Keep it up! I'm excited to see what you make!

  • @cheesam4
    @cheesam4 2 роки тому

    hey!
    do you know how to like animation start in scene?
    cuz idk how to code...

  • @w_hoami4130
    @w_hoami4130 2 роки тому

    I can't figure out how to add the png to the project though-

  • @CalVR152
    @CalVR152 Рік тому

    how do I fix my sprite from moving everywhere when it plays? each key frame moves the sprite left or right btw idk if it makes a difference but there is 9 pixels between each frame

    • @DrewConley
      @DrewConley  Рік тому

      Maybe an alignment issue within the actual sprite sheet image? If it’s a pixel by pixel jump, prob not a configuration problem on the Godot side

    • @CalVR152
      @CalVR152 Рік тому

      @@DrewConley thx I got to work with very minimal moving to the point where it actually looks good with the animation by moving the sprites

  • @tyya3365
    @tyya3365 2 роки тому

    how to make animation move when i click button

  • @doublepixels7420
    @doublepixels7420 2 роки тому

    I think I don't get...is there another way to use the animation player

  • @Peter-vx5yf
    @Peter-vx5yf 3 роки тому

    There a way to make this by code?

  • @turbotegs2102
    @turbotegs2102 3 роки тому

    So if you have multiple sprite sheets you just create multiple sprite nodes 1 for each of them right?

    • @DrewConley
      @DrewConley  3 роки тому

      Yep, that’s a good approach. It is also possible to swap out the texture of a Sprite node on the fly. This works well for frames that all use the same animation patterns, like changing character skins, but totally new frame behavior is prob best for another Sprite node.

    • @turbotegs2102
      @turbotegs2102 3 роки тому

      @@DrewConley oh, I had my animations separated, walk animation is 1 sprite sheet, jump animation is another and so on... should I try and stuff them all into 1 sprite node i guess?

  • @seamuskills
    @seamuskills 2 роки тому

    What do I do if all the frames are individual images rather than a sheet?

    • @DrewConley
      @DrewConley  2 роки тому

      Can you combine them to a sprite sheet?

    • @klaatubarada6200
      @klaatubarada6200 2 роки тому +1

      You can use AnimatedSprite instead of AnimationPlayer.

    • @Bloom_HD
      @Bloom_HD Рік тому

      I have the same issue. Except I have different sprite sheets for different animations. If you figured out how to deal with that please let me know :)

  • @OGNova23
    @OGNova23 2 роки тому

    6:02

  • @ahmedbahaa9418
    @ahmedbahaa9418 Рік тому

    i don't unserstand what is hapening

  • @HalfAsleepSam
    @HalfAsleepSam 2 роки тому +1

    I hate Animation Player, it makes my brain go eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerrrrrrrr

  • @DragonKing987
    @DragonKing987 Рік тому +1

    Nothing working in Godot 4 as described in this tutorial, first off where is kinetic body 2d in the node menu? It doesn't exist, the function described is not there. This tutorial video is useless for beginners when important functions are missing!

    • @poulinhp
      @poulinhp 7 місяців тому +2

      It's usually not missing it's just called something else, you have to experiment

    • @hilalstein4236
      @hilalstein4236 6 місяців тому +1

      Mf this is a 3 years old tutorial

    • @poulinhp
      @poulinhp 6 місяців тому +1

      Did I help

    • @hilalstein4236
      @hilalstein4236 6 місяців тому

      @@poulinhp yes you did sir, My comment was towards the guy who first commented

    • @Tehgon
      @Tehgon 5 місяців тому

      ignore the snarky twat its CharacterBody2D that you were looking for (and anyone else who may come here lookin)

  • @cheesam4
    @cheesam4 2 роки тому

    hey!
    do you know how to like animation start in scene?
    cuz idk how to code...

    • @thefrenchaxolotl6854
      @thefrenchaxolotl6854 2 роки тому

      then you should not make a video game or learn a tutorial on how to code