I figured out to solve both at the same time today trying to do by myself. I could make it work. your videos are helping me a lot. I put to check the vertical while applying gravity and the horizontal while walking.
@abc-ed9xr8 ай бұрын
Great tutorial! Keep em up! :D
@notallama18685 ай бұрын
This collision method is great, but it breaks when the player size isn't perfectly divisible by the tile size. In some cases, it's not noticeable, but I found that, using your tile size of 64, if I set the player size any multiple of tiles + 6 pixels (70 or 134 for example), you start to get noticeable shaking when colliding with walls to the right or bottom, and if you set player size to anything less than 1 tile, the entire sprite can enter a wall to the right or bottom before the collision is detected and the sprite is abruptly thrown out of the wall. Basically, it works great as long as your sprite's dimensions are at least one tile large and no more than 5 pixels larger than the largest area you can construct within it with full tiles.
@bobbybuckley23463 ай бұрын
this was really helpful was stuck on why this was happening for hours lmao
@veronikagaynulaeva28848 ай бұрын
Great tutorial! Are you planning to make a video about gravity, jumps and stuff?
@grey2968 ай бұрын
yooo new sphere upload
@MurielSoiffer8 ай бұрын
que buen tutorial 👍👍
@cyra95448 ай бұрын
Collision handling is soo annoying. I spent a whole weak tweaking it, and i still don't like how movement feels in my game. Plus sometimes i just clip into a wall for no reason. It's actually depressing
@codingwithsphere8 ай бұрын
I always have a hard time getting collisions working straight away. I like to keep a generic reference implementation to help with the headache. definitely one of the harder parts of making a game
@cyra95446 ай бұрын
@xmlstudios i just added like a movement collision aura. If there is a rectangle in there it starts checking it N times per frame, where N is the length of character's direction vector