You deserve more subscribers, that was such a nice video, I hope I can see more videos like this explaining each step of complex problems making them easy and encrouraging to try and solve on your own. You get a sub from me mate, love and hope to see more like this content!
Hello, I really liked this video. Very well explained. You inspired me to recreate it in C# with SDL2 and it worked! However, I don't really like the curvy walls and haven't found a good way to fix it, do you have any ideas?
Thank you so much for your comment and I'm glad the C# implementation worked well, you probably get a much better framerate :D Regarding the curvy walls, this is partly a distortion due to the particle being a 2D point source so the euclidean distance at the periphery of the field of view is longer even when looking at a flat piece of wall. This results in the edges being perceived as further away and so the height of the slice is altered. This can be corrected in a number of ways which I might explore in a future video, but the most common (I think) is to make a trigonometric alteration to the distance calculation. I've attached a link to a nice explanation which should be pretty easy to implement. I hope that is helpful and happy coding! :) www.permadi.com/tutorial/raycast/rayc8.html
I think you use too good formula for this simple task Your raycast works on all sorts of surfaces, but you only use square grid with walls With that, you can check if your ray goes on the edge of current tile, checks if there a wall and continues to go further if there's no wall Sorry for bad explanation, but you should get the idea
I made some similar code for generating a maze, but I'd want to ask how do I get the solution to the maze, or make a traditional maze with an entrance at the top where the algorithm starts and the lower right as an exit? Can you link me your sources I'd be glad
Thanks for your comment! The way I generate the maze means that every cell is able to be visited from every other cell (even though the path may be somewhat long). So you can just declare a start and end cell and initially remove the outer wall from each (this won't affect the maze building). One could be positioned at the top right and bottom left. To find the path, you could use a neighbours list in the cell class and then your favourite path finding algorithm (I have a video on BFS and DFS for pathfinding: ruclips.net/video/ips-y8ekRnM/видео.html) to go from your start cell to your end cell. I hope that's helpful, I don't have any external links for this but my maze builder is on GitHub (github.com/EruditeCode/3D_python/blob/main/2D_raycasting/maze_builder.py).
Thanks for your comment. The video was getting a bit long and I quite like the warping effect, however, I may revisit this as the correction is quite interesting :)
So much talent and effort with so little subscribers? +1 sub, I'm looking forward to see more cool stuff!
Thank you so much for your comment and sub, it really does mean a lot! Got many exciting projects coming soon :)
This calm and comprehensive style of programming video is the type of stuff I love, great video!
Thank you so much, that feedback is really helpful as I'm still learning quite how much detail to put in without making a huge or slow video :D
Excellent video! Your channel is very underrated!
Thank you for the kind comment :)
You deserve more subscribers, that was such a nice video, I hope I can see more videos like this explaining each step of complex problems making them easy and encrouraging to try and solve on your own. You get a sub from me mate, love and hope to see more like this content!
Thank you so much, I'm glad you enjoyed the video and I hope to have more exciting projects coming soon :)
Great job. I'm anxious to see the next Episodes.
Thank you :) I'm glad you liked it!
Perfect🔥🔥🔥
Thank you. Subscribed
Hello, I really liked this video. Very well explained.
You inspired me to recreate it in C# with SDL2 and it worked! However, I don't really like the curvy walls and haven't found a good way to fix it, do you have any ideas?
Thank you so much for your comment and I'm glad the C# implementation worked well, you probably get a much better framerate :D Regarding the curvy walls, this is partly a distortion due to the particle being a 2D point source so the euclidean distance at the periphery of the field of view is longer even when looking at a flat piece of wall. This results in the edges being perceived as further away and so the height of the slice is altered. This can be corrected in a number of ways which I might explore in a future video, but the most common (I think) is to make a trigonometric alteration to the distance calculation. I've attached a link to a nice explanation which should be pretty easy to implement. I hope that is helpful and happy coding! :)
www.permadi.com/tutorial/raycast/rayc8.html
Really Good Job !
Thank you :)
thanks for great tutorial!
You're welcome, I'm glad you enjoyed it :D
Hey 👋 i have one question how do you export the maze's coordinates from the maze builder ? 4:11
I think you use too good formula for this simple task
Your raycast works on all sorts of surfaces, but you only use square grid with walls
With that, you can check if your ray goes on the edge of current tile, checks if there a wall and continues to go further if there's no wall
Sorry for bad explanation, but you should get the idea
Nice video :)
I'm glad you enjoyed it, thanks :)
I made some similar code for generating a maze, but I'd want to ask how do I get the solution to the maze, or make a traditional maze with an entrance at the top where the algorithm starts and the lower right as an exit? Can you link me your sources I'd be glad
Thanks for your comment! The way I generate the maze means that every cell is able to be visited from every other cell (even though the path may be somewhat long). So you can just declare a start and end cell and initially remove the outer wall from each (this won't affect the maze building). One could be positioned at the top right and bottom left. To find the path, you could use a neighbours list in the cell class and then your favourite path finding algorithm (I have a video on BFS and DFS for pathfinding: ruclips.net/video/ips-y8ekRnM/видео.html) to go from your start cell to your end cell. I hope that's helpful, I don't have any external links for this but my maze builder is on GitHub (github.com/EruditeCode/3D_python/blob/main/2D_raycasting/maze_builder.py).
You need to correct the fisheye effect and the warping on the edges.
Thanks for your comment. The video was getting a bit long and I quite like the warping effect, however, I may revisit this as the correction is quite interesting :)
@@eruditecode it is! when it clicked for me it was a real "AHA!" moment haha. lovely video :3
Tasty mustard
Haha, I know the colors are a bit mustardy :)
dewmn
fully (plane)ray cast
amazing lol
did you bake the lighting, in the engine
plane-ray is the 3d compatible extension of the 2d ray casting engine
intersect with bvh spheres, its a dot product if you have normalized the plane normal vector (a,b,c)