Пікірлер
@Pepcen
@Pepcen 28 күн бұрын
how do you find the side tho???
@Banaannaa
@Banaannaa 24 күн бұрын
pythagoras
@Haunted.01
@Haunted.01 Ай бұрын
at 2:00 yn = Player.y - (Player.y/cellsize)xcellsize is 0 right?
@Haunted.01
@Haunted.01 Ай бұрын
oh he is using integers, ignoring floats.
@mr.random6270
@mr.random6270 Ай бұрын
Good stuff
@nahhhhhhhhhhhhhhhhhhh
@nahhhhhhhhhhhhhhhhhhh 2 ай бұрын
Nice animations
@alisson4387
@alisson4387 2 ай бұрын
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.
@dhanushc5744
@dhanushc5744 2 ай бұрын
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.
@Squeph
@Squeph 4 ай бұрын
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
@giovannicesaramorim9adigan961
@giovannicesaramorim9adigan961 6 ай бұрын
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
@RonPaul20082012
@RonPaul20082012 7 ай бұрын
Your math is garbage I wasted too much time on it.
@classicviewer
@classicviewer 8 ай бұрын
Awesome thanks for the explanation! :)
@thanhdangthingoc9301
@thanhdangthingoc9301 8 ай бұрын
For any one who wonder the math formula for horizontal was correct he just forget to round up like 2.8 to 2
@clock0789
@clock0789 11 ай бұрын
Thank you sir!
@ahmadshariq7116
@ahmadshariq7116 Жыл бұрын
This is the most comprehensive and simple explanation that I have seen to date. Great job.
@wdpko2926
@wdpko2926 Жыл бұрын
why do u divide cellsize and multiply it again at 2:00 am i just stupid?
@dannaki_d
@dannaki_d 11 ай бұрын
No, you think right way. This formula is 0 return.
@joaquimjesus6134
@joaquimjesus6134 Жыл бұрын
MapResolution = 32 'cellsize PlayerPosX = MapResolution + 20 PlayerPosY = MapResolution + 20 PlayerAngle = 0.1 'Radians NearstY =PlayerPosY- PlayerPosY / MapResolution * MapResolution why i get zero?
@dannaki_d
@dannaki_d 11 ай бұрын
Because the formula is incorrect in the video.
@SbAlmagro
@SbAlmagro Жыл бұрын
2:40 How come tan a = y_s / x_s -> y_s = x_s / tan a? Could you explain?
@Cloud-kd7mx
@Cloud-kd7mx 7 ай бұрын
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
@SbAlmagro
@SbAlmagro 7 ай бұрын
@@Cloud-kd7mx Thanks. Could you explain how come y_s / tan a = x_s -> y_s = x_s / tan a?
@Cloud-kd7mx
@Cloud-kd7mx 7 ай бұрын
@@SbAlmagro this equation is incorrect Because if y_s / tan a = x_s Then y_s = x_s * tan a
@SbAlmagro
@SbAlmagro 7 ай бұрын
@@Cloud-kd7mx true. But that is what you wrote.
@Cloud-kd7mx
@Cloud-kd7mx 7 ай бұрын
@@SbAlmagro oh, then it's my bad, lol, didn't read myself
@khangdao8119
@khangdao8119 Жыл бұрын
Why is yn = (py-(py/cellsize))*cellsize in 2:08 ? Is there any trigonometric formulas there?
@ringzero3260
@ringzero3260 Жыл бұрын
that part does not make sense. probably a mistake. (py-(py/cellsize))*cellsize will always equal 0
@hakansuner2578
@hakansuner2578 6 ай бұрын
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...9321
@unmandarinoalgiorno...9321 2 ай бұрын
@@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
@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
@funhavver
@funhavver 2 жыл бұрын
Pass it over 😀
@ismyname_jep1394
@ismyname_jep1394 2 жыл бұрын
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.
@weirddevers9165
@weirddevers9165 2 жыл бұрын
oh gosh! It’s been more than a year since I uploaded it. I’m so glad it helped you
@ilikemorestuff
@ilikemorestuff 2 жыл бұрын
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!
@maxut5122
@maxut5122 2 жыл бұрын
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?
@sun7961
@sun7961 2 жыл бұрын
You mean bri'ish?
@weirddevers9165
@weirddevers9165 2 жыл бұрын
Watch snotty boy glow up meme
@maxut5122
@maxut5122 2 жыл бұрын
@@sun7961 yeah, bo’le of wa’er)
@RoboMarchello
@RoboMarchello 2 жыл бұрын
This is awesome!
@itsepic11_
@itsepic11_ 2 жыл бұрын
What did you use to edit videos?
@weirddevers9165
@weirddevers9165 2 жыл бұрын
Davinci Resolve
@itsepic11_
@itsepic11_ 2 жыл бұрын
Yessss another video
@Alex-wf7zy
@Alex-wf7zy 2 жыл бұрын
Noice, very cinematic
@weirddevers9165
@weirddevers9165 2 жыл бұрын
Noice, my friend
@weirddevers9165
@weirddevers9165 3 жыл бұрын
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
@maxut5122
@maxut5122 3 жыл бұрын
I will not say anything.
@Alex-wf7zy
@Alex-wf7zy 3 жыл бұрын
Somehow I managed to survive that day at school😅
@Vilwer
@Vilwer 3 жыл бұрын
Well, what do YOU use to make your games?
@weirddevers9165
@weirddevers9165 3 жыл бұрын
I use Unity as a game engine but making games also requires other software like Aseprite and Blender
@ShonazALT
@ShonazALT 3 жыл бұрын
Bruh wtf, why don't you have at least 1,000 subs
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Thanks! KZbin doesn’t promote our videos enough but if you’re here it means youtube has started showing my video😀
@IcarusoofDev
@IcarusoofDev 3 жыл бұрын
Interesting! I have subscribed to your channel sir!
@weirddevers9165
@weirddevers9165 3 жыл бұрын
hat tip sir
@pepterty
@pepterty 3 жыл бұрын
Omg👍 I love it
@christhegamedev
@christhegamedev 3 жыл бұрын
Interesting stuff!!
@RoboMarchello
@RoboMarchello 3 жыл бұрын
Крутой монтаж! Потом поиграю!
@Alex-wf7zy
@Alex-wf7zy 3 жыл бұрын
This game has the worst gameplay I’ve ever seen 😵👎
@CODEFORTRESS
@CODEFORTRESS 2 жыл бұрын
Hate other peoples game not God's
@qqdoos6256
@qqdoos6256 3 жыл бұрын
cool😊
@tedeusz83
@tedeusz83 3 жыл бұрын
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..
@YiTsukENyt
@YiTsukENyt 3 жыл бұрын
Ity deserves 1 million views
@YiTsukENyt
@YiTsukENyt 3 жыл бұрын
at least
@breakdancerQ
@breakdancerQ Жыл бұрын
1 billion at least
@ringzero3260
@ringzero3260 Жыл бұрын
@@breakdancerQ it's full of mistakes.
@YiTsukENyt
@YiTsukENyt 3 жыл бұрын
Really good video
@harding5674
@harding5674 3 жыл бұрын
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
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Thanks🙂
@gabrielsegura626
@gabrielsegura626 4 ай бұрын
I don't undestand this video
@blow42176
@blow42176 3 жыл бұрын
Thanks for this great video !
@RoboMarchello
@RoboMarchello 3 жыл бұрын
Привет, продолжай делать видео, хорошо что ты ростешь! Я тоже использую pygame:)
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Спасибо 👍.
@moohot3479
@moohot3479 3 жыл бұрын
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.
@weirddevers9165
@weirddevers9165 3 жыл бұрын
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
@moohot3479
@moohot3479 3 жыл бұрын
@@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!
@johnvine5731
@johnvine5731 2 жыл бұрын
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)
@swasthikshetty6329
@swasthikshetty6329 3 жыл бұрын
Nice explanation
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Thanks
@Alex-wf7zy
@Alex-wf7zy 3 жыл бұрын
At 1:42 you show how to calculate “a” which is squared though it shouldn’t be
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Oh, It's really squared. I should have noticed it.
@esenia5323
@esenia5323 3 жыл бұрын
wow!! it's so fascinating and brilliant!!! I hope one day I'll see here more subscribers because you have really good content!
@eil_rovisoft7097
@eil_rovisoft7097 3 жыл бұрын
Oh, it’s your voice? I can’t believe in it...
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Sorry for the voice in the second half. I got sick
@super-cylinder
@super-cylinder 4 ай бұрын
🥺i hope you are okay now
@qqdoos6256
@qqdoos6256 3 жыл бұрын
cool eric i love you!!