CodingTrain / Suggestion-Box

A repo to track ideas for topics
572 stars 86 forks source link

Coding Challenge: Shadow projection from light source #1266

Open ThatIsAPseudo opened 5 years ago

ThatIsAPseudo commented 5 years ago

Shadow projection

What about recreating a a 2D simulation of shadow projection by a point light source, as featuring in several indie games ? I tried to do it on my own and managed to get a pretty good result, but it was quite hard to list each different area to consider in order to compute the projection. Here is a gif of my result, i'll upload my code later when I finish it.

shadow_projection

andrewboyley commented 5 years ago

Red Blob Games has a great post about this! They generally have pretty cool game design features that would be ideal for p5.js

https://www.redblobgames.com/articles/visibility/