Dominate Godot Platformer Movement! - The Ultimate Beginner Tutorial

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

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

  • @ItsNoneh
    @ItsNoneh 8 วันที่ผ่านมา +2

    Man, you saved my life, this tutorial is amazing and I'm offended it has so few views

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

    very underrated tutorial

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

    Thank you, Icy Engine. I was able to incorporate some of these features like the dash without an issue, with the Godot Engine 4.3.

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

    I've just finished watching the tutorial and I didn't realise it was from such a small channel (not in a bad way) because of the quality, I genuinely thought the production was professional. Amazing video! You earned a new subscriber for sure!

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

    As a teacher, I approve this very well explained video. Good job!

  • @Mech_Pete
    @Mech_Pete 4 หลายเดือนก่อน +1

    Great job. Nice pace and clear explanations. I'd like to see a part 2 where you show us how you added the animations to this.

  • @Tieslo
    @Tieslo 4 หลายเดือนก่อน +1

    amazing quality of video and edits. would be very interested on seeing a video of you adding more features to this like ledge grabbing. cheers

  • @Yachmen
    @Yachmen 4 หลายเดือนก่อน +1

    Wish you luck in making videos. It`s really great tutorial especially for ones who started learn smth about game dev (me). Thank you mate

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

    Incredible tutorial! Explains everything well, provides assets, code if needed, and works great! Thank you very much

  • @Devlorra
    @Devlorra 29 วันที่ผ่านมา

    You explained this so good! I just had to subscribe. I want to be a game dev youtuber aswell, but I have like 0 knowledge xD

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

    Great stuff! would love to see more tutorials. subscription earned :)

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

    I liked this. Straight to the point, very informative, and great for beginners! :]

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

    Thank you so much, this video cleared up a lot of things for me. You just got your 100th sub :)

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

    Great turorial, thanks a lot!

  • @killuaomo2275
    @killuaomo2275 18 ชั่วโมงที่ผ่านมา

    amazing work bro. i love you video

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

    Great tutorial! I love your style, it's easy to understand the code with your explanations if you don't have idea of coding. If you make a second part about character movement, can you please talk about double jumps and jump buffer? Subscribed!

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

    Damn such a good ass tutorial bro

  • @the-flip-of-flips
    @the-flip-of-flips 10 วันที่ผ่านมา

    10:32 im having trouble with this, godot says “speed” is not declared in the script
    edit: nevermind! fixed it! forgot to remove an indent

  • @نور-س7ل2ص
    @نور-س7ل2ص 3 หลายเดือนก่อน

    amazing !

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

    Very eazy to understand

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

    Hi when I run the game during dashing I get the following error in debugger: Cannot call non-static function "sample()" on the class "Curve" directly. Make an instance instead.
    my code is same as your but ill paste it here-
    if is_dashing:
    var current_distance = abs(position.x - dash_start_position)
    if current_distance >= dash_max_distance or is_on_wall():
    is_dashing = false
    else:
    velocity.x = dash_direction * dash_speed * dash_curve.sample(current_distance / dash_max_distance)
    velocity.y = 0
    if dash_timer > 0:
    dash_timer -= delta
    Please help me with this, everything else is S tier and thanks in advance for putting this tutorial up.

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

      Hey! Glad you like the tutorial! I might have a solution for your problem. The code you displayed here is fine, but I suspect you did something wrong with creating the variable dash_curve.
      Did you, by any chance, declare the variable like this:
      @export var dash_curve = Curve
      Because it should be:
      @export var dash_curve: Curve
      Hope that solves your problem :)

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

      @@IcyEngine That was it, I see my mistake, I didnt know thats how you declared type of variables. My muscle memory typed it as var dash_curve = Curve.
      Thank you again for reaching out so quickly. I really appreciate it. Hope you have a great vacation. Looking forward to learning from your videos more soon.

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

      @@IcyEngine I made the same mistake, thanks for the help!

  • @jookie8469
    @jookie8469 24 วันที่ผ่านมา

    How would I add buffer jump to this? it doesn't seem to be compatible with the buffer jump tutorials I'm finding

    • @IcyEngine
      @IcyEngine  21 วันที่ผ่านมา

      I wouldn't say it's not compatible... you'd have to get creative. In programming there are thousands of ways to do a single thing, same goes for implementing an input buffer for jumping here. What input buffering essentially is, is queueing up an input and executing a command (jumping) when a state is reached (touching ground). Keeping in mind that I want the code tutorial to be simple and understandable, I would add a variable that is of type boolean that would be set to true if we press the jump button but we're in the air. Once we touch the ground AND that boolean is true, I would execute another jump and set that boolean to false again.
      It would look something like this:
      ## 1 line added under the variable declarations.
      var jump_buffer = false
      ## Replace the original jump code with jump buffer handling and then jump handling:
      # Handle jump buffer.
      if is_on_floor() and jump_buffer:
      jump_buffer = false
      velocity.y = jump_force
      # Handle jump.
      if Input.is_action_just_pressed("jump"):
      if (is_on_floor() or is_on_wall()):
      velocity.y = jump_force
      else:
      jump_buffer = true
      BUT... there's a tiny catch with this one. Games often have a set of frames where the buffer stays active so that you won't be punished by unintentional input buffering. What I mean is, that in the code above, pressing the jump button two times in quick succession, would cause the player to jump again upon landing on the ground. But this is my quick and dirty solution to your problem. Good luck!

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

    good tutorial

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

    i did everything in this vid but the camera doesnt follow the player
    idk what i did wrong
    edit: fixed it lol
    character was set to node2d instead of characterbody2d

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

      Haha happens, good thing you fixed it🔥

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

    Very good tutorial, but don't forget about Coyote time. Thank you, subscribed

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

      That’s a nice addition, hadn’t crossed my mind when I was thinking of basic moves.

  • @Fadus-s
    @Fadus-s 8 วันที่ผ่านมา

    Can you make how to add animation to this project?

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

      I did! Well… sort of… I made an video on how to add sprite animation and how to add lines of code to make it work. Second video of my channel. In the comment section of that video is also a pastebin link that contains the animations you saw at the end of this video.

    • @Fadus-s
      @Fadus-s 8 วันที่ผ่านมา

      @IcyEngine thanks!

  • @Tieslo
    @Tieslo 4 หลายเดือนก่อน +1

    how would you add sprint jumping to this?

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

      Could you elaborate on the mechanic for a bit? Do you mean like increasing speed for a bit upon performing the jump like what happens in Minecraft when running and jumping?

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

      @@IcyEngine currently you can sprint if you are pressing the key and are on the floor. I want the increased speed to carry on jumps. I can just get rid of the and is_on_floor() but then you can start sprinting mid air.

    • @IcyEngine
      @IcyEngine  4 หลายเดือนก่อน +1

      @@Tieslo a alright, like that. So what I get from this is that you added the is_on_floor() check yourself. This means that you won’t be able to turn around mid-air, but rather keep the momentum while being slowed down by the deceleration. What you could do is change the else to an “elif” (short for else-if) and also add a is_on_floor() check, or completely encapsulate the walk/run part in a floor check condition.
      I’m still not entirely sure if this is what you want since you won’t be able to control your character mid air anymore, that’s why in the code in the video, there is no floor check in the walk/run section.
      However, if you still want to be able to turn around mid air, but not being able to sprint mid-air, still remove the floor check you have, and above, next to the ‘Input.is_action_pressed(“run”)’, add “and is_on_floor()” so you will only be able to start running while being on the floor, but only change directions at normal speed in mid-air.

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

      @@IcyEngine I just want to say thank you for taking the time to answer these noob questions.
      Even though you probably don't see it, you're helping more than just the person asking the question so thank you thank you thank you for doing so.

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

      Thanks! That means a lot to me. Nothing wrong with noob questions right? Everyone has to begin somewhere. Just glad I could help🫶

  • @honda02134
    @honda02134 17 วันที่ผ่านมา

    ❤❤❤❤❤❤❤

  • @Sirlopsteropster
    @Sirlopsteropster 4 หลายเดือนก่อน +1

    Get famous please add animation tut on how to integrate animations

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

    how did you do the animation

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

      Ah yes, so you should look up how to make animations for now since I’m not planning on making a tutorial for those right away (I just left for vacation since I’m still a student).
      In my video I only have a idl, walk and a jump animation right? What you want is the following:
      1. Replace the Sprite2D with a AnimatedSprite2D. Then create animation for it with animation names.
      2. Create a variable to couple that AnimatedSprite2D to the PlayerController script (@onready var animated_sprite = $AnimatedSprite2D)
      3. Then using that variable you want to start playing it on the right places using animated_sprite.play(“animation_name_here”).
      4. In the script, I swapped the jump and walk/run section, otherwise it started playing waling animations in the air.
      5. Then the walking code should look something like this:
      if direction:
      velocity.x = move_toward(… acceleration …)
      animated_sprite.flip_h = direction == -1
      if is_on_floor()
      animated_sprite.play(“walk”)
      else:
      velocity.x = move_toward(… deceleration …)
      if is_on_floor()
      animated_sprite.play(“idle”)
      6. Then the jump part is really easy, just add an animated_sprite.play(“jump”) right under the line where you set the velocity.y to jump. Make sure the jumping animation is not looping in the spriteframes.
      The Godot Docs on 2D animation is pretty easy to follow: docs.godotengine.org/en/stable/tutorials/2d/2d_sprite_animation.html

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

      @@IcyEngine np I know how to do the animation and did it just was a bit confused with it on this code.

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

      No that’s fair, the code is to give an idea into how to build mechanics, if I were to implement animations I would work with state machines, but they can get much more complicated then this.

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

      @@IcyEngine everyones telling me