Posted October 22, 2019 by kcaze
I got a couple questions about how I did the lighting for Space Jelly so I've created a minimal sample Godot project that implements the core algorithm in about ~40 lines of code and uploaded it as part of this post. The lighting is done by raycasting to the vertices of all the specified occluder objects and then connecting the results to form a Polygon2D which is drawn on top of the starry background in the game. For more details, please refer to https://ncase.me/sight-and-light/ and to the sample project for the implementation.