Learn how to structure scenes! || Composition Demo || Godot 4 Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 พ.ย. 2024

ความคิดเห็น • 32

  • @jacobfoxe4691
    @jacobfoxe4691  9 หลายเดือนก่อน +7

    Hey Friends, thanks for watching!
    As a tip, I commented as much as I could with the inline documentation techniques within the Godot 4 Editor, so if you grab the code from the Github link, you can search the documentation for each of the custom classes!
    And a bunch of the export vars should have tooltips when you hover over the values. Honestly, this saves so much time trying to remember what some random vars do on your 400th shrub scene.

  • @Hernaxho
    @Hernaxho 9 หลายเดือนก่อน +3

    This was a great tutorial to learn about composition. I'm still a beginner in how to code in general so I was a bit confused trying to see where all the code comes together so I had to rewind a lot.

  • @kentmiggalen9756
    @kentmiggalen9756 9 หลายเดือนก่อน +6

    Please don't stop posting tutorial/guides videos.

  • @w花b
    @w花b 4 หลายเดือนก่อน +11

    Where's the third video???

  • @vrts
    @vrts 2 หลายเดือนก่อน +1

    Amazing lesson. Subscribed hoping that you'll release the next part!

  • @Kolbiathan
    @Kolbiathan 6 หลายเดือนก่อน +2

    Interesting that you don't use any custom Resources. Have you considered how they may work with a compositional system like this? I have recently started using Resources and they seem quite powerful for compositional systems.

  • @sp.v.207
    @sp.v.207 6 หลายเดือนก่อน +1

    This was very helpful, thank you

  • @Nenufarm
    @Nenufarm 8 วันที่ผ่านมา +1

    Hey man, love the vid but i got a problem with the Velocity module, im using the latest version of godot,
    I get the error :
    " Cannot call non-static function "is_on_floor()" on the class "CharacterBody2D" directly. Make an instance instead. "
    Any idea on how to fix it?
    Thx for the vid btw

    • @jacobfoxe4691
      @jacobfoxe4691  8 วันที่ผ่านมา

      Hey, thanks for the comment! This tutorial was done in 4.2, so maybe something broke with 4.3? Can't recall off the top of my head what my syntax was, but I'd guess instantiate() the CharacterBody2D and then use is_on_floor() on the var that was instanced. Lmk if that's a non-start also!

    • @Nenufarm
      @Nenufarm 8 วันที่ผ่านมา

      @@jacobfoxe4691 Yo! Wasnt expecting an answer really.
      Somewhat fixed the issue? Now the error is "Cannot call method "is_on_floor" on a null value" on the handleVelocity, i also get a error on the player script with velocityNode.handleVelocity(delta).
      This is my first time looking at composition and its kinda hard lol

  • @ToonNoah
    @ToonNoah 3 หลายเดือนก่อน

    personally, i'd set the individual node export var to automatically choose the parent characterbody IF the variable is null. Otherwise, I do like the idea of being able to set up the parent node manually, i usually just set it to get_parent().get_parent() lmao

    • @jacobfoxe4691
      @jacobfoxe4691  25 วันที่ผ่านมา

      Honestly, I do really like this method, as well! It's waaaay easier/cleaner (sometimes) to have children "register themselves" with their parents. I do like what I did in the video because it yells at me if I try to run the project without things set up, but it's a LOT of clicking for sure.

  • @longuemire748
    @longuemire748 7 หลายเดือนก่อน +1

    Thank you for this video.

  • @7fg9sd8a9
    @7fg9sd8a9 8 หลายเดือนก่อน +1

    you forgot to link the previous episode in the description

  • @Innere_Stille
    @Innere_Stille 7 หลายเดือนก่อน

    damn the glowing border around the sub button ar 1:44 was awesome. first time i saw that. was that something u needed to code yourself or a new feature from yt?

    • @jacobfoxe4691
      @jacobfoxe4691  7 หลายเดือนก่อน +1

      haha that surprised me as well! Must be a YT feature because I definitely didn't do anything!

    • @Awaited
      @Awaited 7 หลายเดือนก่อน

      Yeah it’s a new TH-cam feature. I’ve been seeing it for a very long time on a bunch of channels

  • @LithuanianSage
    @LithuanianSage หลายเดือนก่อน

    question abt naming: u name a few funcs differently, e. g. checkMailInput() and deliver_mail(), same with vars: mailBag, mail_target, etc. Is there any reason / tie to ur architecture logic why switch between these naming conventions?
    edit: another question, u mentioned that module containers can be modules too, how would u enforce that? just add an export group in that module container for the required modules?

    • @jacobfoxe4691
      @jacobfoxe4691  25 วันที่ผ่านมา +1

      Just a mix of habits accrued over years in different industries and languages, honestly! I've been trying to standardize my coding style for future tutorials, but I'm a work in progress! Here's the Godot Style link in case anyone's curious: docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_styleguide.html
      Per the module containers, yeah, that'd be one way to do it! At least, it'd be a good way of keeping track of which nodes are where.

  • @_I-OvO-I_
    @_I-OvO-I_ 4 หลายเดือนก่อน +1

    Do you just remember everything or are you using a diagram to follow how everything is connected?

    • @jacobfoxe4691
      @jacobfoxe4691  4 หลายเดือนก่อน +2

      I always diagram out a project before starting, but I'm historically TERRIBLE at showing that in videos! It's something I'm actively working on incorporating into future tutorials and demos!

  • @ekaprasetya5858
    @ekaprasetya5858 7 หลายเดือนก่อน

    Did anyone have a trouble with Y sort enabled when implementing workflow like he did?

  • @ScumlordStudio
    @ScumlordStudio 9 หลายเดือนก่อน

    5:00 maplestory music :)

    • @elpatatas2561
      @elpatatas2561 6 หลายเดือนก่อน +2

      I think is stardew valley music xd

    • @ScumlordStudio
      @ScumlordStudio 6 หลายเดือนก่อน

      ​@@elpatatas2561 nope at 5 minutes this is 100% maplestory

    • @elpatatas2561
      @elpatatas2561 6 หลายเดือนก่อน +1

      @@ScumlordStudio I'm not sure, I've been playing MapleStory since 2005 until now, I would recognize it haha. I think it's this OST from Stardew Valley (I've also played Stardew Valley)
      th-cam.com/video/7WuKj7a3ces/w-d-xo.html
      play the link from min 1:22

    • @Rouo24
      @Rouo24 หลายเดือนก่อน

      @@ScumlordStudio It's Stardew Valley, more specifically "Spring (Wild Horseradish Jam)"

  • @felipebdc4316
    @felipebdc4316 9 หลายเดือนก่อน +2

    📝📝📝📝📝

    • @jacobfoxe4691
      @jacobfoxe4691  9 หลายเดือนก่อน +3

      me frantically writing code for part 3

  • @Kio_Kurashi
    @Kio_Kurashi 3 หลายเดือนก่อน +2

    Your manner of speaking while you explain things feels insulting since I am not a child (and I'd probably still be miffed even then), but this is still a good tutorial.
    I've been trying to find a tutorial that was more than "here's my composition nodes. Look, I can put this health component on this NPC _and_ this player. WoOooOOo~." without ever actually explaining how it works. Most of it was pretty obvious, but the part that had always escaped me before was connecting things once you added them. My OOP addled brain would always try to connect them in the parent class making the system _mostly_ redundant. At least then the change wouldn't necessitate modifying everything that used that component if I decided to add or remove one from an entity. So I essentially had just adapted the modularization to OOP principles without actually taking full benefit of the composition's strengths.
    So you and Godotoneer's videos were the only ones that were helpful (but the latter is long and takes me a few days to actually watch through with how dry it is despite it being _very_ informative).
    So thank you for making this tutorial, and I'll _try_ sitting through more of your tuts in the future since it's quite clear that you know what you're doing unlike people who regurgitate the bare minimum and only specifically as it applies to their system.

    • @jacobfoxe4691
      @jacobfoxe4691  3 หลายเดือนก่อน +1

      Thanks for the feedback! I appreciate the perspective and I'm glad you found the tutorial helpful!