1:04:14 This formula can be confusing if you're truly unfamiliar with how computer graphics work. In computer graphics, y increases downwards, so the opposite side is py - ay, not ay - py. If that's the case, why does the formula still work? Why isn't py - ay correct? It's because our y is flipped. Imagine you're looking up-right: tan(a) is negative (angles increase clockwise in graphics), and py - ay is positive. Positive over negative is negative, so instead of going right, we go left. The simple solution? Just multiply by -1, and suddenly ay - py works. Or, you could calculate tan(360° - a) to get the nice counterclockwise increment that's so popular in math books.
You're absolutely right, I actually made a mistake there. The proper way of showing that was if I flipped the image vertically. The ray would be facing bottom right, and Ay - Py would be right. imgur.com/a/48vshnV
great video, i honestly really liked it edit in case you read the comment from a notification : i just realised a few seconds later why what i'm saying is dumb, flooring a number that's whole no matter what isn't the smartest thing to do
3D Sage has some great videos on developing both a ray cast engine and binary space partition engine. His videos are between beginner and intermediate coding. But the videos expects you may know nothing and simply want to learn.
@@whtiequillBj 3D Sage videos were actually the reason why I made my own tutorial. I didn't like the way he explained the code and, for a beginner, I thought it would be tough to understand.
I believe binary space partitioning is not the method used to render, but returns what gets rendered; saving memory. The rendering method is, i believe, similar to raycasting.
I actually did a mistake on saying that Doom was a raycaster! Doom used a different technique called Binary-Space-Partitioning.
This is the video I was searching for
This was the perfect tutorial for me. Instant sub
Thanks man, you explanation is very good.
1:04:14 This formula can be confusing if you're truly unfamiliar with how computer graphics work. In computer graphics, y increases downwards, so the opposite side is py - ay, not ay - py. If that's the case, why does the formula still work? Why isn't py - ay correct? It's because our y is flipped. Imagine you're looking up-right: tan(a) is negative (angles increase clockwise in graphics), and py - ay is positive. Positive over negative is negative, so instead of going right, we go left. The simple solution? Just multiply by -1, and suddenly ay - py works. Or, you could calculate tan(360° - a) to get the nice counterclockwise increment that's so popular in math books.
You're absolutely right, I actually made a mistake there. The proper way of showing that was if I flipped the image vertically. The ray would be facing bottom right, and Ay - Py would be right. imgur.com/a/48vshnV
Great video bro, i wish i were as good at python as u, i started learning python a week ago and this is way toooooooo impresive, new follow ❤
Nice to hear that, man! Keep learning and you will achieve even more impressive stuff :D
very informative and easy to digest
thank you
great video, i honestly really liked it
edit in case you read the comment from a notification : i just realised a few seconds later why what i'm saying is dumb, flooring a number that's whole no matter what isn't the smartest thing to do
No problem man, i'm glad you liked it!
finally im saving this bad boy until i learn moderngl so i can apply this so i feel better about myself
Nice video
🔥
1:28 Doom does not use raycasting.
no. Doom was NOT a ray-caster! It used binary-space-partitioning.
Didn't know that :O
3D Sage has some great videos on developing both a ray cast engine and binary space partition engine. His videos are between beginner and intermediate coding. But the videos expects you may know nothing and simply want to learn.
@@whtiequillBj 3D Sage videos were actually the reason why I made my own tutorial. I didn't like the way he explained the code and, for a beginner, I thought it would be tough to understand.
@@pythonista_333 he is over focused on trying to be funny. Your video is much better.
I believe binary space partitioning is not the method used to render, but returns what gets rendered; saving memory. The rendering method is, i believe, similar to raycasting.