In this video, I implement a basic ray casting engine with line segment “surfaces” and vector “rays.” The result simulates a light source casting shadows in a 2D canvas. https://thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/s...
🎥 Next video: • Coding Challenge #146: Rendering Rayc...
🎥 All videos: • Coding Challenges
References:
🌞 SIGHT & LIGHT by Nicky Case: https://ncase.me/sight-and-light/
🌞 2d Visibility from Red Blob Games: https://www.redblobgames.com/articles...
💾 p5.collide2D: https://github.com/bmoren/p5.collide2D
🗄 Line-line Intersection: https://en.wikipedia.org/wiki/Line%E2...
Videos:
🎥 Coding Adventure: Ray Marching: • Coding Adventure: Ray Marching
🎥 Matrix Math: • 10.6: Neural Networks: Matrix Math Pa...
🎥 Coding Challenge: Rendering Ray Casting: • Coding Challenge #146: Rendering Rayc...
🔴 Coding Train Live 177: • Coding Train Live 177: 2D Ray Casting...
Timestamps:
0:00:00 Introduction
0:03:34 Coding Starts
0:05:54 Creating a Ray Class
0:09:16 Casting Rays And Finding Intersections
0:19:56 Casting Multiple Rays
0:24:41 Adding Collision Detection For Every Ray
0:26:47 Multiple Boundaries
0:31:23 Moving With Perlin Noise
0:32:41 Suggestions For Improvements
Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound
🚂 Website: http://thecodingtrain.com/
👾 Share Your Creation! https://thecodingtrain.com/guides/pas...
🚩 Suggest Topics: https://github.com/CodingTrain/Sugges...
💡 GitHub: https://github.com/CodingTrain
💬 Discord: / discord
💖 Membership: http://youtube.com/thecodingtrain/join
🛒 Store: https://standard.tv/codingtrain
📚 Books: https://www.amazon.com/shop/thecoding...
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: https://p5js.org
🔗 p5.js Web Editor: https://editor.p5js.org/
🔗 Processing: https://processing.org
📄 Code of Conduct: https://github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecod...
Auf dieser Seite können Sie das Online-Video Coding Challenge 145: 2D Raycasting mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer The Coding Train 08 Mai 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 643,423 Mal angesehen und es wurde von 15 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!