Uploaded October 2018 | Updated November 2026, 2 days 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:
stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
redblobgames.com/articles/visibility
ncase.me/sight-and-light
Source: github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_ShadowCasting2D.cpp
discord.gg/WhwHUMV
Blog: onelonecoder.com
Twitter: @javidx9
Twitch: javidx9
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:
stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect
redblobgames.com/articles/visibility
ncase.me/sight-and-light
Source: github.com/OneLoneCoder/Javidx9/blob/master/PixelGameEngine/SmallerProjects/OneLoneCoder_PGE_ShadowCasting2D.cpp
discord.gg/WhwHUMV
Blog: onelonecoder.com
Twitter: @javidx9
Twitch: javidx9










