Skip to main content

2D Light and shadow effects - 2.0.0

Create 2D light sources onto a pygame surface and generate shadows using polygon layer



The class can be easily implemented into a 2D game (top down or horizontal/vertical scrolling) to enhanced the lighting ambiance. Version 2 changes : Added volumetric effect (animated smoke or plasma) in the illuminated area to set a specific ambiance. This effect can also be used for generating force field aspect around a set point. Added warning light (rotational lighting) Implemented shadow projection effects from a light source coordinates (See file for more details and credit to Marcus Møller for its shadow algorithms ( Code clean-up and split the code into different modules DEMO available in the directory dist. *** The assets directory must be in the same location than the executable file


Home Page


2D Light and shadow effects 1.0 — 18 May, 2018

2D Light and shadow effects 2.0.0 — 18 May, 2018 account Comments

  • Reece Sharpe 2018-05-18 14:53:25.178607

    Cool, I love this post, guys gave us so much space to create

    Berenguer 2018-05-25 06:54:08.860193

    Thank you Reece, have a nice day