at 2:00 yn = Player.y - (Player.y/cellsize)xcellsize is 0 right?
@Haunted.01Ай бұрын
oh he is using integers, ignoring floats.
@mr.random6270Ай бұрын
Good stuff
@nahhhhhhhhhhhhhhhhhhh2 ай бұрын
Nice animations
@alisson43872 ай бұрын
I can't understand "-" in xn = cellsize - (player.x / cellsize) * cellsize, timing 2:39. I was expecting xn = cellsize + (player.x / cellsize) * cellsize. (player.x / cellsize) - tell us how much cells the player walked throng x axes. (player.x / cellsize) * cellsize - we convert cells walked for pixels walked. this value corresponds the left side in the cell where player is currently. cellsize + (player.x / cellsize) * cellsize - give us the right side of the cell where player is currently, in others words, the y value where first vertical intersection occur.
@dhanushc57442 ай бұрын
this was so confusing. feel like lot of information is omitted and not explained in details. im not sure how it is "fully explained". Not even sure if the issue he just assumes others know or he incorrectly explained.
@Squeph4 ай бұрын
For wall colour, you can change the colour the lines are drawn depending on the distance to the wall that you calculated, so it gets darker the further away the walls are
@giovannicesaramorim9adigan9616 ай бұрын
How do you know when you have hit a wall? I'm thinking about using a matrix, but wouldn't that just be infinitely small points in the determinate coordinates? The numbers in the matrix aren't lines
@RonPaul200820127 ай бұрын
Your math is garbage I wasted too much time on it.
@classicviewer8 ай бұрын
Awesome thanks for the explanation! :)
@thanhdangthingoc93018 ай бұрын
For any one who wonder the math formula for horizontal was correct he just forget to round up like 2.8 to 2
@clock078911 ай бұрын
Thank you sir!
@ahmadshariq7116 Жыл бұрын
This is the most comprehensive and simple explanation that I have seen to date. Great job.
@wdpko2926 Жыл бұрын
why do u divide cellsize and multiply it again at 2:00 am i just stupid?
@dannaki_d11 ай бұрын
No, you think right way. This formula is 0 return.
2:40 How come tan a = y_s / x_s -> y_s = x_s / tan a? Could you explain?
@Cloud-kd7mx7 ай бұрын
tan a = y_s / x_s 1 / tan a = x_s / y_s y_s / tan a = x_s y_s = x_s / tan a
@SbAlmagro7 ай бұрын
@@Cloud-kd7mx Thanks. Could you explain how come y_s / tan a = x_s -> y_s = x_s / tan a?
@Cloud-kd7mx7 ай бұрын
@@SbAlmagro this equation is incorrect Because if y_s / tan a = x_s Then y_s = x_s * tan a
@SbAlmagro7 ай бұрын
@@Cloud-kd7mx true. But that is what you wrote.
@Cloud-kd7mx7 ай бұрын
@@SbAlmagro oh, then it's my bad, lol, didn't read myself
@khangdao8119 Жыл бұрын
Why is yn = (py-(py/cellsize))*cellsize in 2:08 ? Is there any trigonometric formulas there?
@ringzero3260 Жыл бұрын
that part does not make sense. probably a mistake. (py-(py/cellsize))*cellsize will always equal 0
@hakansuner25786 ай бұрын
It uses the formula (cellsize-(player.x/cellsize)*cellsize) for the same calculation when checking vertical intersections. It makes sense when the same formula is used for the y position. I think there was a little confusion
@unmandarinoalgiorno...93212 ай бұрын
@@ringzero3260 it's because in programming, the result of py/cellsize will be an integer. For example 5/3 will be 1. But i think the formula to count xn when checking vertical intersections is probably wrong. From what i understand, it shoud be xn = cellsize - player.x + (player.x / cellsize) * cellsize
@excortia453 Жыл бұрын
hello, i have a question. when u calculate xs, shouldn't xs = ys/-tan(angle)? also, shouldn't i check if player is facing upwards or downwards, becouse when it faces upwards yn = Player.y/cellsize * cellsie and when it faces downwords yn =Player.y/cellsize * cellsize + cellsize
@funhavver2 жыл бұрын
Pass it over 😀
@ismyname_jep13942 жыл бұрын
Wow thank you for simplifying this! I couldn't find any other video that does not gloss over of why and how ray casting works.
@weirddevers91652 жыл бұрын
oh gosh! It’s been more than a year since I uploaded it. I’m so glad it helped you
@ilikemorestuff2 жыл бұрын
Congratulations! You give a concise explanation of the math, why and how it's used in this context, and also provide details on how to employ the given formulae for fine tuning the output. Well done!
@maxut51222 жыл бұрын
Could you explain to me what happened here? Okay, we can see that three guys, being in a confined space, pushing rusty school buses at each other? Am I right? Erick, do you speak British English?
@sun79612 жыл бұрын
You mean bri'ish?
@weirddevers91652 жыл бұрын
Watch snotty boy glow up meme
@maxut51222 жыл бұрын
@@sun7961 yeah, bo’le of wa’er)
@RoboMarchello2 жыл бұрын
This is awesome!
@itsepic11_2 жыл бұрын
What did you use to edit videos?
@weirddevers91652 жыл бұрын
Davinci Resolve
@itsepic11_2 жыл бұрын
Yessss another video
@Alex-wf7zy2 жыл бұрын
Noice, very cinematic
@weirddevers91652 жыл бұрын
Noice, my friend
@weirddevers91653 жыл бұрын
I forgot to thank these people for 3D models that they’ve uploaded on google poly - Poly by Google - Ryan Donaldson - Norbert Kurucz - Sébastien Labrunie - Nick Ladd - Jarlan Perez - Jörg H. - Nac Ken - Alex “SAFFY” Safayan - Jonathan Granskog - Synthakat VR - Aimi Sekiguchi - Jakob Hippe - Andrew-John Hickman - Justin Randall - lovedoll - Adam Dylewski - Derky Sprawl - Jarlan Perez
@maxut51223 жыл бұрын
I will not say anything.
@Alex-wf7zy3 жыл бұрын
Somehow I managed to survive that day at school😅
@Vilwer3 жыл бұрын
Well, what do YOU use to make your games?
@weirddevers91653 жыл бұрын
I use Unity as a game engine but making games also requires other software like Aseprite and Blender
@ShonazALT3 жыл бұрын
Bruh wtf, why don't you have at least 1,000 subs
@weirddevers91653 жыл бұрын
Thanks! KZbin doesn’t promote our videos enough but if you’re here it means youtube has started showing my video😀
@IcarusoofDev3 жыл бұрын
Interesting! I have subscribed to your channel sir!
@weirddevers91653 жыл бұрын
hat tip sir
@pepterty3 жыл бұрын
Omg👍 I love it
@christhegamedev3 жыл бұрын
Interesting stuff!!
@RoboMarchello3 жыл бұрын
Крутой монтаж! Потом поиграю!
@Alex-wf7zy3 жыл бұрын
This game has the worst gameplay I’ve ever seen 😵👎
@CODEFORTRESS2 жыл бұрын
Hate other peoples game not God's
@qqdoos62563 жыл бұрын
cool😊
@tedeusz833 жыл бұрын
Wall are easy, there are different approachs, the best is that from lodev.org in my opinion.. but the more challenging is the floo and ceil casting.. it really kicks the performance..
@YiTsukENyt3 жыл бұрын
Ity deserves 1 million views
@YiTsukENyt3 жыл бұрын
at least
@breakdancerQ Жыл бұрын
1 billion at least
@ringzero3260 Жыл бұрын
@@breakdancerQ it's full of mistakes.
@YiTsukENyt3 жыл бұрын
Really good video
@harding56743 жыл бұрын
i dont understand how this video is only at 917 views (as in, i dont understand why it doesnt have way more views) like this is an extremely good video
@weirddevers91653 жыл бұрын
Thanks🙂
@gabrielsegura6264 ай бұрын
I don't undestand this video
@blow421763 жыл бұрын
Thanks for this great video !
@RoboMarchello3 жыл бұрын
Привет, продолжай делать видео, хорошо что ты ростешь! Я тоже использую pygame:)
@weirddevers91653 жыл бұрын
Спасибо 👍.
@moohot34793 жыл бұрын
I love your video; however, I still have a few questions. For the Horizontal intersect at 2:00; the Y nearest has the Player.y over cell size then multiplied by cell size witch would cancel each other out then by subtracting Y nearest, would output a zero no mater what the two variables equal. Did you mean to put (Player.y (Player.y/cellsize)) cellsize instead of Player.y (Player.y/cellsize) cellsize? I also noted at 2:32 you used cell to subtract, divide and multiply when the previous step only used step to divide and multiply; y-(y/s)s and s-(x/s)s (used letters for simplification) . It was a great video and helped me out tones, I'm just a little lost at a few parts.
@weirddevers91653 жыл бұрын
player.y/cellsize should be evenly divided. For instance if player.y is equal to 131 and cellsize is 64 then player.y over cellsize equals 2. In this case the equation gives the following result yn = 131 - 2*64. If you still have questions I’m willing to answer
@moohot34793 жыл бұрын
@@weirddevers9165 I didn't get the divide evenly part. Thanks for the help, you make things easy to understand. I'm looking foreword to your next video!
@johnvine57312 жыл бұрын
Ah, divide evenly means cast the floating point result of the division to an integer value. (int)(player.y/cellsize) Took a while to realise that! player.y-(( (int)(player.y/cellsize)*cellsize)
@swasthikshetty63293 жыл бұрын
Nice explanation
@weirddevers91653 жыл бұрын
Thanks
@Alex-wf7zy3 жыл бұрын
At 1:42 you show how to calculate “a” which is squared though it shouldn’t be
@weirddevers91653 жыл бұрын
Oh, It's really squared. I should have noticed it.
@esenia53233 жыл бұрын
wow!! it's so fascinating and brilliant!!! I hope one day I'll see here more subscribers because you have really good content!
@eil_rovisoft70973 жыл бұрын
Oh, it’s your voice? I can’t believe in it...
@weirddevers91653 жыл бұрын
Sorry for the voice in the second half. I got sick