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.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

pygame_light2d-2.1.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pygame_light2d-2.1.2.tar.gz
Algorithm Hash digest
SHA256 8ee3d8fadeecef6db1974fbe17278d081ca60df42ffa582858623f19301af52e
MD5 f80b501005c5dc3b8ca6ec1167a01467
BLAKE2b-256 e76d3b6dd17cb4ad105f5e2fdb42108239f2c74d219ae8dfacd866673b33ca5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pygame_light2d-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7d16a93a0356ab1bfb711085b0fa8c274dd34780b81b0755c90bae9efcbc956b
MD5 6323d12a694bdec8fdbc1a2e6b853a86
BLAKE2b-256 d5ae7a3d23d0cc8cdca7457aba77094b181df999255d82b47a7e98c74d7d7b27

See more details on using hashes here.

Supported by

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