Collisions and Vectors | Recreating Zelda

Поділитися
Вставка
  • Опубліковано 2 січ 2025

КОМЕНТАРІ • 41

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

    Very pleasant video, an easy approach to Box2D, just enough to have some basics and dig more by ourselves in the documentation.

  • @pacrox22
    @pacrox22 Рік тому +4

    When you go diagonal the character's movement is faster because a vector(1,1) has a magnitude of √2, while vector (1, 0) has a magnitude of 1.
    The easy fix would be to normalize it, menaning divide the magnitude of vector(1,1) by √2.

  • @Ellohir
    @Ellohir 5 років тому +8

    Interesting! When I looked around everyone discouraged me from using Box2d because it was "too much" for a simple collider library, so I ended up using a manual detection by myself. But now I want to know more about the advantages and disadvantages of using box2d 😁
    Thanks for making this series!

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

    pls make more episodes these are so good well explained and short videos. these are worth gold!

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

    Sadly, without seeing where you add the code snippets inside your repo, I'm not understanding "how" to implement this. I understand what you're sharing in this video, but really struggling to understand how to implement it. I've been trying to decipher this in your changed repo, but it's not possible (with me being a beginner game dev), as the repo is now overly complex and doesn't match any of the code snippets shared from this video.

  • @DevineInnovations
    @DevineInnovations 5 років тому +19

    I would like to know how to manually calculate collisions.

    • @srijanpaul
      @srijanpaul 4 роки тому +4

      start with AABB collision detection. It's very easy to implement and works fine for most games..

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

      @@srijanpaul I followed CS50' pong tutorial and implemented AABB collision detection in my version but sometime it does not work properly :(

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

      @@hoangdesu Maybe you did something incorrectly. What issue are you facing ?

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

      You can watch video from javidx9, code it yourself tile based platform game.

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

    please keep this up, it's really useful and such a good tutorial

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

    This series was great

  • @azurda7483
    @azurda7483 4 роки тому +10

    This series is amazing, exactly what I need to get back into Lua and Löve. I have not watched the other episodes yet but I have a question. How do we tell the code what the collision hitbox should be attached to. For example, how did you tell the collision circle to attach to the statues inside? With Link it makes sense since his position was just the same as the collision box

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

      Maybe both of them just have the same coordinates

  • @nerdypigproductions4137
    @nerdypigproductions4137 5 років тому

    I'm so glad I have found this, I have your courses on udemy you are brilliant I'm currently learning live2d using you course which is brilliant

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

    I notice when I use 2 non static collision boxes and they interact, the boxes start spinning. How do I prevent this?

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

      Make sure you set the Fixed Rotation to true. If you're using Lua/LOVE like me, that would be this:
      love2d.org/wiki/Body:setFixedRotation

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

    man, your videos are very good!
    even though i dont' speak english very well, I understand everything!

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

    This is a great tutorial that simplifies Box2D! Now that we have this context, is there a way to create collisions for maps? I’ve been trying to find one for Love2D. Thanks for this tutorial either way!

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

      I talk about that a little bit in this video around the 3 minute mark:
      ua-cam.com/video/NgUTo5EISNY/v-deo.html
      Basically, you iterate through an object layer where you draw your platforms, and you call some 'spawnPlatform' function using the Tiled object's properties. This can work with any type of object.

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

      @@Challacade that video helps too! Thank you!

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

    Does Box2D handles also diagonal collisions? eg Link moving link against a slope wall, instead of stopping, it goes diagonally up or down the slope. His movement is not tiles based and it’s quite smooth. Any idea how to accomplish this?

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

    Why those neat and quality-perfect development series don't have much attention? :C

  • @RyanStokes4GOVFL
    @RyanStokes4GOVFL 5 років тому +1

    TY for the content. Will you be covering 'Collision Walls' as well?

    • @RyanStokes4GOVFL
      @RyanStokes4GOVFL 5 років тому +1

      @@Challacade TY sir. I just started watching your vids and haven't played with the library yet. Can't wait.

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

    I think that diagonal movement is wrong. It should be sqrt(1+1), otherwise you are moving faster than when you go horizontal or vertical.

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

      True! These days I tend to use normalized vectors when doing non-primary directions, so it always turns out to be the same distance. This could make a good video idea :)

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

    I'm trying to design a game that renders in 2d and looks 3d, but because of aspergers and dyslexia, my hope of coding is... not great. This was a great tutorial, and I'm wondering how optimized this could get with an extra rendered dimension?

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

    But the speeds aren't accurate. Link is moving faster when going diagonally.

  • @richie5029
    @richie5029 5 років тому

    Really nice, thank you!, waiting for the next one :)

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

    I like the video very much. But I was looking for, How old games did collision detection and response. Especially 3D games. I dont get how they managed to run majoras mask or any 3D game on the nintendo ds with a good collision detection and response despite the cpu being so small compared to a desktop pc. i also dont understand how they managed... fuck I dont understand how they did anything. Its not axis alligned and it has moving objects I want to understand how they managed to optimize that shit

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

    is the cam supposed to follow the player around?

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

      I got it, after looking at camera.lua. I tried using the "lockPosition" function and that did it. IDK if its the right method. but it works

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

    hi i was wondering how to install box2d?

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

    How do I download windfield?

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

      You can clone the repo from Github
      github.com/a327ex/windfield

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

      ​@@Challacade what do you mean by "cloning the repo"

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

      @@imnotthebr2230 Cloning a github (or git) repo means you're copying all the code to your own computer. The steps are outlined here (make sure you have Git installed):
      docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository-from-github/cloning-a-repository
      or you can download the repo as a zip. That's also an option on Github.

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

      @@Challacade thank you so much I love ur channel!

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

    FODAAAAA

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

    Tooo many complex to do a so many simple funcion, the AABB algorithm is better than this... The games ever used this and now everything is a complex library... To a game so simple like This... This library is to more complex mechanics...