This module provides fast 2D dynamic lighting for pygame
.
demo.mp4
Python
version >= 3.10OpenGL
version >= 3.3
numpy
>= 1.24.1pygame
>= 2.3.0moderngl
>= 5.8.2PyOpenGL
>= 3.1.6
Firstly, ensure that your system meets the System requirements.
Then, run the following command:
python3 -m pip install pygame-light2d
To verify correct installation, open a Python terminal and import the module:
import pygame_light2d
If there are no errors, the installation was successful!
To learn how to create a simple game with lighting effects using pygame-light2d
, check out the Getting started page on the wiki.
For detailed explanations of the API, please refer to the API Reference.
If you're looking to incorporate pygame-ligth2d
into an existing project, we recommend starting with our guide on Adding lights to an existing project.
This package uses pygame-render for
using shaders in pygame
, and it can be accessed with LightingEngine.graphics
.
For frequently asked questions check out FAQ.
We greatly appreciate and encourage contributions from the community!
Please take a look at the Contributing page on the wiki for details on how to contribute to the project.
This code is licensed under the terms of the MIT license.