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.
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!
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.
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
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!
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.
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?
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 :)
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?
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
@@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.
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...
Very pleasant video, an easy approach to Box2D, just enough to have some basics and dig more by ourselves in the documentation.
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.
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!
pls make more episodes these are so good well explained and short videos. these are worth gold!
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.
I would like to know how to manually calculate collisions.
start with AABB collision detection. It's very easy to implement and works fine for most games..
@@srijanpaul I followed CS50' pong tutorial and implemented AABB collision detection in my version but sometime it does not work properly :(
@@hoangdesu Maybe you did something incorrectly. What issue are you facing ?
You can watch video from javidx9, code it yourself tile based platform game.
please keep this up, it's really useful and such a good tutorial
This series was great
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
Maybe both of them just have the same coordinates
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
I notice when I use 2 non static collision boxes and they interact, the boxes start spinning. How do I prevent this?
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
man, your videos are very good!
even though i dont' speak english very well, I understand everything!
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!
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.
@@Challacade that video helps too! Thank you!
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?
Why those neat and quality-perfect development series don't have much attention? :C
TY for the content. Will you be covering 'Collision Walls' as well?
@@Challacade TY sir. I just started watching your vids and haven't played with the library yet. Can't wait.
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.
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 :)
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?
But the speeds aren't accurate. Link is moving faster when going diagonally.
Really nice, thank you!, waiting for the next one :)
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
is the cam supposed to follow the player around?
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
hi i was wondering how to install box2d?
How do I download windfield?
You can clone the repo from Github
github.com/a327ex/windfield
@@Challacade what do you mean by "cloning the repo"
@@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.
@@Challacade thank you so much I love ur channel!
FODAAAAA
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...