Animating enemies in Godot 4, THE LAZY WAY!

Поділитися
Вставка
  • Опубліковано 20 жов 2024

КОМЕНТАРІ • 121

  • @Smaxx
    @Smaxx 11 місяців тому +40

    Nicely paced video. But one tiny thing I've noticed: I wouldn't clamp the ramp texture. You're losing still a tiny bit on both ends and doing some unnecessary calculation in custom code. Instead, just add the hint `repeat_disable` to your uniform, which automatically tells Godot to disable repeating and instead clamp the edges. Oh, and btw. to create a vec3 (or vec2 or even a matrix) with identical values, you can just pass a single value, e.g. `vec3(.5)`.

    • @yarncatdev
      @yarncatdev  11 місяців тому +9

      Ohhh!!! That’s great to know, thank you!! ^^ those will be really useful.

    • @yarncatdev
      @yarncatdev  11 місяців тому +6

      I have now pinned this comment! I hope it helps other people that watch the video, it's great info! Thank you again!

    • @sanyi9667
      @sanyi9667 11 місяців тому +2

      for those that don't know how to place hint the line becomes as follows "uniform sampler2D toonramp: repeat_disable, source_color;"

    • @sanyi9667
      @sanyi9667 11 місяців тому

      anyone know how to add a normal map? trying to do "NORMAL_MAP = texture(normal_map,UV).xyz;" does not give out good results.

    • @yarncatdev
      @yarncatdev  11 місяців тому

      @@sanyi9667 thanks! Good point!

  • @NaughtyKlaus
    @NaughtyKlaus Рік тому +35

    I learned more about shader development from your examples than anything I've previously watched.

    • @yarncatdev
      @yarncatdev  11 місяців тому

      That's great to hear, I wasn't so sure how the video was going to go, glad people are finding it useful ^^

    • @LeSingeDeMars
      @LeSingeDeMars 11 місяців тому +1

      @@yarncatdev All gdshader video are welcome!
      Yours is great because few (almost none) have covered a usecase for vertex.

    • @yarncatdev
      @yarncatdev  11 місяців тому

      @@LeSingeDeMars yay! If you like usecases for vertex, you're gonna love the next video hahaha.

  • @joshhoffman7811
    @joshhoffman7811 11 місяців тому +10

    This is fantastic. Literally the first time I've seen a gamedev tutorial define terms as it goes. I wish more people used this format!

    • @yarncatdev
      @yarncatdev  11 місяців тому +3

      I spent some time going over it several times and making sure I was explaining things well enough, I'm so glad it was appreciated ^^ was afraid of being like "TOO MUCH INFO"

  • @uheartbeast
    @uheartbeast 11 місяців тому +2

    Steller video. I just subbed.

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you, I'm a big fan of your content ^^ Wasard is on my wishlist and I've been meaning to read Production Point too :)

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

    I am your 5th subscriber. hell yeah. I am seeing lots of potential here - great godot content! keep it up

  • @imberny
    @imberny Рік тому +7

    Who are you to just hit the ground running with such great content? I am proud to be part of the before-30-subscribers gang! More sweet shader stuff like this please!

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

      @@kmouratidis pathetic

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

      Yay, that's great to hear, I love playing with shaders, will definitely be covering more of them :)
      I did spend way more time making this video than I intended hahaha, I'm hoping to spend less time on the next ones if my perfectionism allows for it. xD need to find the right balance between quality and effort.

  • @muskito
    @muskito 11 місяців тому +1

    video incrivel!

  • @anon746912
    @anon746912 11 місяців тому +1

    Really good introduction to shaders. Thanks for uploading!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you for watching ^^

  • @TherronKeen
    @TherronKeen 11 місяців тому

    Videos explaining code *one word at a time* is so, so incredibly helpful. Thank you

  • @martinx9027
    @martinx9027 11 місяців тому +1

    Wow, I wasnt expecting such an educative content when I clicked, but was worth the watch! Really interesting topic, everything clearly explained and packed without interruptions or deviations. Keep it up!!

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you! That's exactly what I was going for ^^

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

    coming from reddit for like and abo. Because I want to create my characters with a voxel-editor, this style of animation is a good hint, thanks for the video!!

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

      Thank you for the comment! I believe this kind of animation can look great with the voxel look :) I love using it for game jams where I need to get things done quickly.

  • @sheepcommander_
    @sheepcommander_ 11 місяців тому +2

    the was a genuinely amazing video!
    i love videos where I learn rather than step by step tutorials the most :D

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Yay! Thank you! That’s great to hear ^^

  • @HeraldOD
    @HeraldOD 11 місяців тому +2

    Great video, I love the little explanation cards and how you zoom into different parts of the editor. Also the pacing is great, no slow explanations, just you showing us how you do it!

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you! It took me a long time to figure how to set all of those in the video editing and to actually write it all up, I'm glad it was appreciated ^^ I'm hoping next time it'll be a little faster to make hahahah, took me the whole weekend to make this video.

    • @HeraldOD
      @HeraldOD 11 місяців тому +1

      @@yarncatdev Wow that's a lot of time!! Hopefully with habit it will be easier

  • @mirrorizen
    @mirrorizen 11 місяців тому +1

    Bro genius bro

  • @BobsiTutorial
    @BobsiTutorial Рік тому +5

    Some high quality stuff!

  • @collinvisser7108
    @collinvisser7108 Рік тому +2

    Very neat - helpful

  • @MattyDoesGameDev
    @MattyDoesGameDev 11 місяців тому +1

    This video was awesome! I loved how you broke down each component of the shader as you typed them out. I learned more watching this one video than I have in hours of reading shader documentation. Thanks for sharing!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you! I was worried it would be too much information too quickly, but it seems that it really resonated well with people ^^ Really glad it worked out, I'm excited to make more!

  • @jakem4638
    @jakem4638 11 місяців тому +3

    Good video man. Weird how much I learned. You have a talent for explaining these complex topics in a way that is so intuitive (weirdly) to understand

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Glad to hear ^^ I hope the next ones will stay weirdly intuitive to understand hahahha.

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

    What an amazing tutorial! You've inspired me to learn Godot! Now I have to think about Games I can make... Keep up the good work!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Godot is a lot of fun

  • @tatertime
    @tatertime 11 місяців тому

    Thank you soooooo much for actually showing the code! I watch so many of these and they blast by because it's "boring" but that is the part I love to see and try to understand

  • @Skita4
    @Skita4 11 місяців тому +1

    Very nice tutorial, thank you !

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you for your kind words! ^^

  • @OctopusBlues
    @OctopusBlues 11 місяців тому +1

    Very easy to follow tutorial - thanks for sharing your technique!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you! I'm glad you feel this way ^^ I have lots of other things I've been doing in my games I'm excited to share in future videos as well.

  • @DevlexOnline
    @DevlexOnline Рік тому +2

    Hi, nice and interesting video. I'm looking forward to see more of you 🙂

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you! I'm excited to make more videos! Will be trying to do a new one per week :)

  • @hexdump8590
    @hexdump8590 11 місяців тому +1

    continue with this type of content... you have a new sub

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you! Will do ^^ I have lots of ideas of other cool things I've been doing in my games I'd like to make videos about, will be trying to make a new video per week.

  • @sanyi9667
    @sanyi9667 Рік тому +11

    i'd love to see a card game tutorial - the basic the better. there are currently no godot card game tutorials out there. if you can make it a series of 5-8 videos that would be even better. cheers!

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

      That's a good idea, I don't want to make a full on entire game tutorial series at the moment, but 2 of the games I'm making involve cards. I'm planning on making one-off tutorials showing things I'm already doing in one of my games.
      I found a 12 video tutorial series on making a card game in godot (3 years old) so there's at least one series out there covering it ^^
      Is there something specific about making card games in godot you'd like to learn more about? The UI of it? The data? How to structure/architect the system for it?

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

      @@yarncatdev dude, that series is old and incomplete. No deck editor, no saving system, no card exchange, no win/objective system, no card mechanics. You try to create abilities and stuff and then you find out you do not know how to implement anything. There are frameworks out there like db0's but that is so complex and overwhelming. Card games can become SUPER difficult to make. And I saw you dealing with those and I thought there could be a perfect fit. I do not demand anything specific, make videos on what you already did. Even better, on things that are simpler that those you worked with. You made a card game? made a video series about a game that is 10x simpler that yours. Link them videos together. They will make more sense, at least for me. Just saying. Peace

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

      @@sanyi9667 I see, makes sense, will see if I can think about something ^^ Thanks for the idea, appreciated!

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

      @@yarncatdev This is funny, since I'm making a Card Game currently, I thought I'd chime in on the matter.
      And yeah, they can be deceptively tricky.
      Personally I'd say, what people will struggle with the most is probably the architecture.
      Everything that goes from the point of having a random card on screen (in my case it was even worse, a 3D object in a Subviewport, but that's besides the point) be clickable, perhaps animating somewhere and depending on the card does a different effect somewhere completely different was really un-intuitive.
      I personally have massively underestimated this myself, so I thought this might help.
      Bonuse points if you can show a clean integration with a Database of sorts. (For me it was a GoogleDocs sheet and some Hacky/Perhaps Clever File Naming to automatically load the right Assets for each card ID)

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

      @@hiiambarney4489 Lol, I'm doing literally the same for the database, I made a google spreadsheet importer that takes the sheet and creeates/updates godot resources with it, assigning images and all that it's needed :) github.com/DanielSnd/godot-gspreadsheet-importer I made it available here, I'll be making a video about it in the future ^^
      I get that about the architecture, took me a while to figure out the best way to handle it too xD

  • @teo2805
    @teo2805 11 місяців тому

    Great video, learned a lot. Instant sub.

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you, that's great to hear ^^

  • @pxldj
    @pxldj Рік тому +2

    Welcome!!!!

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Thank you! I feel very welcomed hahahah.

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

    Big job!!!

  • @deepw3bs
    @deepw3bs Рік тому +2

    Awesome!

  • @gonderage
    @gonderage 11 місяців тому

    Man, I really do need videos of people just raw dogging shader code. Reading stuff like docs and others' code is great, but having someone explain it as they develop it is even better.

  • @NadDew
    @NadDew 11 місяців тому +1

    i'm not even a programmer, i'm a woman in her 40's but i watched the whole video and i'm intrigued now i think i can learn how to code it doesn't looks hard as i imagined it would be 😅

    • @yarncatdev
      @yarncatdev  11 місяців тому

      That's great to hear ^^ Thank you! Coding doesn't have to be hard :) It's mostly logic, just gotta learn and get used to the syntaxe of the language you want to use.

  • @learningcode314
    @learningcode314 11 місяців тому +1

    Great video, thanks a lot!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Thank you for watching ^^

  • @benjamin-reis
    @benjamin-reis 11 місяців тому +1

    Hahaha show Daniel! 🤩

  • @felipeminuzzo6410
    @felipeminuzzo6410 Рік тому +2

    Really great video!
    You should do a complete basic to advanced Godot Shaders course. I always struggle a bit to find material and really learn it, usually I take a look in some examples and random docs to understand what is happening, which doesn't help much the learning process,

    • @yarncatdev
      @yarncatdev  11 місяців тому

      I don't know if I can hahahah, I'm still learning godot shaders myself, some commenters pointed out some things I could have done better on this shader, which is great, I'm excited to use that new knowledge in my next video ^^
      I think for now I'll be making videos showing/explaining things I'm creating for my own games like I did in this one.
      Thanks for the kind words!

  • @Ocdib
    @Ocdib Рік тому +2

    Subbed! Where can I wishlist your game?

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

      Thank you! I completely forgot to add links hahahha, I have now added a link to Dice Crypt and links to my other games on the description, thanks for reminding me!

  • @hthemaster1
    @hthemaster1 11 місяців тому +1

    Wow sincerely I don't use to comment but I just learned so much here that I wanted to say thank you for showing us this amazing explanation of shaders, very inspirational ❤

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Your comment is greatly appreciated ^^ I'm loving to see how people are finding the video. I was a little worried it was too long/too fast/ too much information. But it's great seeing people are enjoying it!

    • @hthemaster1
      @hthemaster1 11 місяців тому

      ​@@yarncatdev in my personal opinion, the rhythm of the video was really good and is easy to understand. This is exactly the kind of content that I would like to see in my home page so I subscribed 😊

  • @Vondora
    @Vondora 11 місяців тому +1

    Thanks! I'm doing a custom material for a ortogonal game in unreal and I could use that skew to make things clearer. They used that in A link between worlds and that game looked fantastic.

    • @yarncatdev
      @yarncatdev  11 місяців тому

      For sure! Some camera angles really don't make justice to our pretty models, skewing them helps show them off better ^^

  • @Xonatron
    @Xonatron 11 місяців тому

    Awesome!

  • @void9853
    @void9853 11 місяців тому +1

    More shaders and godot ♥

    • @yarncatdev
      @yarncatdev  11 місяців тому

      I'm on it! ^^ Will be trying to do a new video per week, hoping to post a new one today or tomorrow.

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

    Nice

  • @sloppyy
    @sloppyy 9 місяців тому

    is that the shadow wizard money gang

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

    The best way to go when creating an animation system is using Shaders yeah, more complex for beginners because of the parallelism but yeah.

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Interesting, what do you mean by parallelism? I"m not really familiar with the term :o

    • @astrahcat1212
      @astrahcat1212 11 місяців тому +1

      @@yarncatdev GPU programming works through parallelism, that is you don't give instructions from top to bottom when you code it. In other words, imagine, instead of 'Step 1...Step 2...Step 3...' it goes like 'Step 45....Step 87...Step 2...' etc... It's because it has tons and tons of cores.
      If you set the color of a pixel within your fragment function, and set it to blue, there's no way of knowing what pixel it will be, so you have to use math, multiplying normalized (0.0 to 1.0) numbers by each other to blend colors. It's pretty complex stuff, it takes experimentation to warp your head around it at first.

    • @yarncatdev
      @yarncatdev  11 місяців тому

      @@astrahcat1212 Ahhh, I see what you mean, makes sense.

  • @UnstoppableTigra
    @UnstoppableTigra 11 місяців тому +1

    cool vid

  • @morgan0
    @morgan0 Рік тому +2

    10:11 you don’t need to make each shader unique, you can make it an instance uniform and then set it in the code whenever you instantiate them (doesn’t seem to show up in the editor side panel for me).

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

      also i think instance uniforms are faster than duplicated shaders

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

      Ohhh that's good to know, thanks, I didn't look into instance uniforms yet. In this case specifically I didn't want to write code/instantiate from code for this example, but it's good to know for production :)

    • @morgan0
      @morgan0 11 місяців тому +3

      @@yarncatdev last night after posting that, i figured out it does show up in the gui, just in a different section, so unless you need to update stuff every frame (which i do for what i was working on), you don’t need to do any scripting for that

    • @yarncatdev
      @yarncatdev  11 місяців тому

      @@morgan0 ohhh :o that'll be perfect then, will be looking into that :)

    • @morgan0
      @morgan0 11 місяців тому +2

      @@yarncatdev at my computer now, the instance params are in the geometryinstance3d section below visibility range

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

    "So I just switched from Unity. For no apparent reason, I swear! ;-)".

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Hahahahha, there was definitely a reason 😝 But I'm really glad I made the switch, I really enjoy godot. It's so much faster, never realized how much time I wasted in unity looking at loading bars complete hahahhaa. Changed something in the code? Loading bar. Opening the project? Super long loading bar... Imported a new texture/model? Loading bar... Everything has a damn loading bar hahahah.

    • @igorthelight
      @igorthelight 11 місяців тому

      @@yarncatdev True! ;-)

  • @momberg4483
    @momberg4483 11 місяців тому +1

    are you brazilian arent you? i am too, im starting im the game dev, you have any advice?

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

    godot shader code is super interisting ... cause you dont have any good documentation on it thank you ! how would you recreate a water shader that takes curves and different axis ( waterfall ) into account ... a great example is seen in the tft base arena

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Depends, the classic way is to UV the mesh of the waterfall in a way that essentially the curves aren't really curved in the texture (they're uv'd so it's all straight in the texture). I haven't really done a waterfall shader from scratch yet, but minionsart has a really good tutorial on it (unity, but still, same concept can be applied to godot once you understand it ^^) I'd recommend checking hers out.

  • @FredyyDev
    @FredyyDev 11 місяців тому +1

    Por acaso vc é brasileiro?

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Sou sim :)

    • @FredyyDev
      @FredyyDev 11 місяців тому

      @@yarncatdev parabéns pelo conteúdo mano!

    • @yarncatdev
      @yarncatdev  11 місяців тому

      @@FredyyDev obrigado ^^

  • @doro69
    @doro69 11 місяців тому +1

    I’m never going to be able to learn shaders 😢

    • @yarncatdev
      @yarncatdev  11 місяців тому

      Awe D: what part do you have trouble with? Maybe I can make a new video covering things in a more approachable way? Anything specific confuse you on this one? 🥲

  • @Jose.Eduardo.C
    @Jose.Eduardo.C 11 місяців тому

    Brasileiro? Asking because the way you say unity

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      Hahahaha, sou brasileiro sim ^^

    • @Jose.Eduardo.C
      @Jose.Eduardo.C 11 місяців тому +1

      muito bom mano! feliz de ver nossa gente fazendo conteudo de qualidade!@@yarncatdev

    • @yarncatdev
      @yarncatdev  11 місяців тому +1

      @@Jose.Eduardo.C Obrigado ^^ Vou tentar manter uma frequencia de um video por semana, vamos ver se consigo rs.