Рет қаралды 633,215
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. thecodingtrain.com/challenges...
🕹️ p5.js Web Editor Sketch: editor.p5js.org/codingtrain/s...
🎥 Next video: • Coding Challenge #146:...
🎥 All videos: • Coding Challenges
References:
🌞 SIGHT & LIGHT by Nicky Case: ncase.me/sight-and-light/
🌞 2d Visibility from Red Blob Games: www.redblobgames.com/articles...
💾 p5.collide2D: github.com/bmoren/p5.collide2D
🗄 Line-line Intersection: en.wikipedia.org/wiki/Line%E2...
Videos:
🎥 Coding Adventure: Ray Marching: • Coding Adventure: Ray ...
🎥 Matrix Math: • 10.6: Neural Networks:...
🎥 Coding Challenge: Rendering Ray Casting: • Coding Challenge #146:...
🔴 Coding Train Live 177: • Coding Train Live 177:...
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: thecodingtrain.com/
👾 Share Your Creation! thecodingtrain.com/guides/pas...
🚩 Suggest Topics: github.com/CodingTrain/Sugges...
💡 GitHub: github.com/CodingTrain
💬 Discord: / discord
💖 Membership: kzfaq.infojoin
🛒 Store: standard.tv/codingtrain
📚 Books: www.amazon.com/shop/thecoding...
🖋️ Twitter: / thecodingtrain
📸 Instagram: / the.coding.train
🎥 Coding Challenges: • Coding Challenges
🎥 Intro to Programming: • Start learning here!
🔗 p5.js: p5js.org
🔗 p5.js Web Editor: editor.p5js.org/
🔗 Processing: processing.org
📄 Code of Conduct: github.com/CodingTrain/Code-o...
This description was auto-generated. If you see a problem, please open an issue: github.com/CodingTrain/thecod...