Skip to main content

Fast 2D dynamic lighting engine for Pygame.

Project description

Pygame Light 2D

This module provides fast 2D dynamic lighting for pygame.

https://github.com/MarkelZ/pygame-light2d/assets/60424316/a8d1322b-ac05-47d4-8b04-2786f0d3c96a

System requirements

  • Python version >= 3.10
  • OpenGL version >= 3.3

Python package dependencies

  • numpy >= 1.24.1
  • pygame >= 2.3.0
  • moderngl >= 5.8.2
  • PyOpenGL >= 3.1.6

Installation

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!

Getting started

To learn how to create a simple game with lighting effects using pygame-light2d, check out the Getting started page on the wiki.

Documentation

Using the API

For detailed explanations of the API, please refer to the API Reference.

Using pygame-light2d in an existing project

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.

Graphics engine

This package uses pygame-render for using shaders in pygame, and it can be accessed with LightingEngine.graphics.

Frequently Asked Questions

For frequently asked questions check out FAQ.

Contributing

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.

License

This code is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame_light2d-2.1.3.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygame_light2d-2.1.3-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file pygame_light2d-2.1.3.tar.gz.

File metadata

  • Download URL: pygame_light2d-2.1.3.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pygame_light2d-2.1.3.tar.gz
Algorithm Hash digest
SHA256 be6c8120f057cab20f3672e100678251c2816f20ac7c5292ffb36b14d806d820
MD5 c2b9303c92bb03bd3d6a44fc6db712fb
BLAKE2b-256 337d59192d8807f2fe84556e915f336b23c7e604a015691d201dffa5b98557d3

See more details on using hashes here.

File details

Details for the file pygame_light2d-2.1.3-py3-none-any.whl.

File metadata

  • Download URL: pygame_light2d-2.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pygame_light2d-2.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 890806c6290357da30b921f668efe9b6415a4eaba21f46a78a0a7c7e5bb81a0f
MD5 222ef8ad8ad395acef62c5c6a44ec325
BLAKE2b-256 24c7dc76ecf6708585baaf734c56d0289dfa9ec1ed725471c293e4f3a75ad5c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page