Platformer Defold Tutorial 4 - Jumping, debugging

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

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

  • @ajinkyax
    @ajinkyax ปีที่แล้ว +6

    you are sharing more Tutorials than Defold foundation should have. Thanks. Subscribed.

  • @simpletube31
    @simpletube31 ปีที่แล้ว +1

    I dont even finish previos one! Pawel, u are best!

  • @jeromebousquie3379
    @jeromebousquie3379 ปีที่แล้ว +1

    Excellent work (as usual) :-D
    I enjoyed also the part about the debugger.
    I have to confess that I would have implemented the naive method of normal correction in the collisions without your explanation.
    Impressive work once again. Please continue that way :-)

  • @batlin
    @batlin 5 หลายเดือนก่อน +3

    10:54 instead of "math.abs(normal.x) > 0", we can just use "normal.x ~= 0".
    I must admit that I found the last few minutes dealing with "accumulated corrections" to the penetration vector really, really confusing. Do you have any pointers to material that goes into this in smaller, slower steps for dummies like me?

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

      I agree. Sometimes the explanations are very detailed and I can follow and sometimes I am unable to understand what problem is being solved. I am a beginner but I think for this simple platformer the "accumulated corrections" might not be necessary. I am simply moving the character out of the current collision with one line of code within the on_message function: ""go.set_position(go.get_position() + (message.normal * message.distance))""

  • @martingoodson1651
    @martingoodson1651 ปีที่แล้ว +2

    Coming thick and fast now, thank you! How many parts do you think this series will be?

    • @unfolding_gamedev
      @unfolding_gamedev  ปีที่แล้ว +3

      We will be adding effects next time, then I have in my list enemies, camera handling, gui, levels loading, so perhaps 5-6 parts 😉

  • @hiey4968
    @hiey4968 ปีที่แล้ว +2

    hi, I have been looking for a very long time for a detailed guide on the camera. The fact is that whatever I do, the camera does not work (does not follow the player)

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

    How to make one way plataforms?
    I'm trying to do it usint by checking on the player script:
    if self.velocity.y 0.7 then
    -- apply accumulated correction on penetration vector
    end
    This workd ans i xan jukp through the cellings, but if my junp is weak and my player velocity.y reacha 0 at the middle of the jump while trespassing the celling, the resukt is somewhat bugy. I need a better aproach to this problem, so the player falls back to the groud if the jump is real istead of bugging in the celling when his y spped == 0

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

    Is it a big deal if every time i touch grass there are tons of errors, but everything works pretty good?

  • @playmedusa
    @playmedusa ปีที่แล้ว +2

    Woa, the compensation part was dense! I have questions! :D
    1 Isn't the collision normal vector normalized? In that case, distance = distance * vmath.length(normal) is just distance, right? Why wouldn't it be normalized?
    2 line 76 (minute 13) distance is an scalar. distance * projection is a vector, or isn't projection a vector? This line confuses me! Can you elaborate, please? :D

    • @unfolding_gamedev
      @unfolding_gamedev  ปีที่แล้ว +1

      1. There is no place in Defold documentation that says the normal vector is actually normalized, hence I wanted to leave it like this, but in fact I did not reproduce any case, where 'normal' was not normalized 😁 I think it might be true and you are safe to go without it. I asked the Defold team to note it in the documentation if it's true.
      2. The projection is a number, it represents a projected extent of the 1. vector (self.correction) onto the 2. vector (normal * distance, which is a vector, because normal is vector). Reference: www.defold.com/ref/vmath/#vmath.project:v1-v2
      Thank you for asking this. I should have add a visual representation of all those vectors and values perhaps, but in the end I didn't, so I should explain it in the next part in depth. Nevertheless, there are still issues in this code (scoping, global functions, no pre-hashing) that I want to address, but I want to keep everything as digestible as possible 😁

    • @playmedusa
      @playmedusa ปีที่แล้ว +1

      @@unfolding_gamedev Aaah, I see, vmath.project returns a scalar! I usually project on planes, with returns a vector, hence my confusion, sorry! Thanks for explaining!

    • @unfolding_gamedev
      @unfolding_gamedev  ปีที่แล้ว

      @@playmedusa no problem! Who asks, will never get lost! 😉

    • @unfolding_gamedev
      @unfolding_gamedev  ปีที่แล้ว

      In the part 5, I will expand the explanation for compensation/correction and I will address all issues raised here :)
      Thank you very much for your insight! ;)

    • @playmedusa
      @playmedusa ปีที่แล้ว

      @@unfolding_gamedev Keep the good work! I'm making a turn-based game with Defold, but your tutorials make me want to make a platformer :D

  • @LDEV-l3p
    @LDEV-l3p 8 หลายเดือนก่อน +1

    Thank you for your tutorial. Now I know why this engine is not popular. A simple platform movement requires so much handwritten code, everything starts from 0, and other engines can achieve this function in 3 minutes. GDevelop even just adds a behavior to fully implement it, but this engine takes 50 minutes, which is the problem. Yes, you can say it's elegant, but no one wants to start making wheels from scratch. The most important thing is to quickly make products and no one wants to waste their lives,It's really a pity.

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

      Obvious rage bait is obvious

    • @unfolding_gamedev
      @unfolding_gamedev  7 หลายเดือนก่อน +2

      Well, quickly made products from pre-baked solutions are swarming the market (especially mobile), it's true, but it doesn't change the fact that more polished games are better. And professional studios can invest their time in tailoring everything from ground up (including even game engines) and Defold finds its niche for professionals that look for flexible enough solutions that on the other hands simplifies multi-platform releases and many other things

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

      It's a minimalist approach, like using a framework with some nice freatures like a scene editor or sprites animation tool integrated. Some people really likes it that way.

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

      It's like driving a car, this is a manual, you want semi automatic or automatic.

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

    The last part is pretty hard to understand, guess maybe AI can explain it.
    Edit: the next episode simplifies and explains this code, so nvm (the AI didn't suggest to simplify).