No video

Ray casting fully explained. Pseudo 3D game

  Рет қаралды 30,285

WeirdDevers

WeirdDevers

Күн бұрын

➤ Description
In this video I am explaining ray-casting.
Ray-casting is the method which was used to render pseudo 3d games before. Wolfenstein 3D uses ray-casting.
➤ Music
• New Day - Patric Patrikios
• The Joint is Jumpin - Joel Cummins
➤ Project
• github.com/ric...
➤ About
Hello! And welcome! My name is Eric and I'm 15. Learning and explaining new things fascinates me.
➤ Credits
Without Grant Sanderson AKA 3Blue1Brown it wouldn't be possible to make this video. I used his open-source project called manim to do all the animations.
/ @3blue1brown

Пікірлер: 47
@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 3 ай бұрын
I don't undestand this video
@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!
@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
@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.
@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
@ahmadshariq7116
@ahmadshariq7116 Жыл бұрын
This is the most comprehensive and simple explanation that I have seen to date. Great job.
@giovannicesaramorim9adigan961
@giovannicesaramorim9adigan961 5 ай бұрын
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
@eddie.z
@eddie.z 3 жыл бұрын
Geat TUtorial. In-depth and Organized.
@weirddevers9165
@weirddevers9165 3 жыл бұрын
Thank you
@eddie.z
@eddie.z 3 жыл бұрын
@@weirddevers9165 No problem
@blow42176
@blow42176 3 жыл бұрын
Thanks for this great video !
@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
@YiTsukENyt
@YiTsukENyt 3 жыл бұрын
Really good video
@Malenki_Stefan
@Malenki_Stefan 3 жыл бұрын
I love this video
@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
@wdpko2926
@wdpko2926 Жыл бұрын
why do u divide cellsize and multiply it again at 2:00 am i just stupid?
@dannaki_d
@dannaki_d 10 ай бұрын
No, you think right way. This formula is 0 return.
@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
@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.
@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)
@clock0789
@clock0789 11 ай бұрын
Thank you sir!
@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 10 ай бұрын
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 6 ай бұрын
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 6 ай бұрын
@@Cloud-kd7mx Thanks. Could you explain how come y_s / tan a = x_s -> y_s = x_s / tan a?
@Cloud-kd7mx
@Cloud-kd7mx 6 ай бұрын
@@SbAlmagro this equation is incorrect Because if y_s / tan a = x_s Then y_s = x_s * tan a
@SbAlmagro
@SbAlmagro 6 ай бұрын
@@Cloud-kd7mx true. But that is what you wrote.
@Cloud-kd7mx
@Cloud-kd7mx 6 ай бұрын
@@SbAlmagro oh, then it's my bad, lol, didn't read myself
@alisson4387
@alisson4387 Ай бұрын
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.
@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.
Wolfenstein 3D's map renderer
14:49
Matt Godbolt
Рет қаралды 273 М.
Super Fast Ray Casting in Tiled Worlds using DDA
30:03
javidx9
Рет қаралды 181 М.
Or is Harriet Quinn good? #cosplay#joker #Harriet Quinn
00:20
佐助与鸣人
Рет қаралды 45 МЛН
At the end of the video, deadpool did this #harleyquinn #deadpool3 #wolverin #shorts
00:15
Anastasyia Prichinina. Actress. Cosplayer.
Рет қаралды 15 МЛН
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
Programming Pseudo 3D Planes aka MODE7 (C++)
27:16
javidx9
Рет қаралды 103 М.
Make Your Own Raycaster Part 1
16:52
3DSage
Рет қаралды 418 М.
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 573 М.
The Most Impressive Scratch Projects
11:00
DenshiVideo
Рет қаралды 4,9 МЛН
Pseudo 3D Road - VGA - Full Tilt - play-through, 2 crashes
6:54
Jason Doucette
Рет қаралды 495
Raycasting Algorithms Part 1
6:38
MagellanicMath
Рет қаралды 29 М.
How Two People Created Gaming’s Most Complex Simulation System
38:54
ThatGuyGlen
Рет қаралды 1,4 МЛН
I Spent 100 HOURS Making a Game With NO GAME ENGINE
13:42
Fuelvin
Рет қаралды 339 М.