@javidx9
  @javidx9
javidx9 | Line Of Sight or Shadow Casting in 2D @javidx9 | Uploaded 5 years ago | Updated 21 hours ago
In this (long, sorry) video I cover a variety of things to implement a classing line-of-sight mapping, or shadow casting depending on your perspective. It's also the first olc::PixelGameEngine project I've done a video for, so I spend some time showing you how to set up Visual Studio to use this engine. I'm quite pleased with the end result of these algorithms and I expect to use them quite a bit in more ambitious tile-based projects in the future.

These resources are excellent regarding the things seen in the video:
https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
https://www.redblobgames.com/articles/visibility/
https://ncase.me/sight-and-light/

Source: https://github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_ShadowCasting2D.cpp

https://discord.gg/WhwHUMV
Blog: http://www.onelonecoder.com
Twitter: @javidx9
Twitch: javidx9
Line Of Sight or Shadow Casting in 2Dolc::BeatTheBoredom Game Jam Theme RevealCoding Quickie: Handling Periodic Numbers with C++ TemplatesNetworking in C++ Part #3: MMO Client/Server Framework, Tweaks & Client ValidationWhat Are Pointers? (C++)olc::CodeJam2021 - AnnouncementPath Planning - A* (A-Star)Code-It-Yourself! 3D Graphics Engine Part #1 - Triangles & ProjectionForbidden C++Programming a Retro Pop-Up Menu SystemSerialising/Deserialising Structured Memory To Disk, AKA Savin StuffCode-It-Yourself! Sound Synthesizer #3 - Instruments & Polyphony

Line Of Sight or Shadow Casting in 2D @javidx9