Luma
Luma Engine is a lightweight Python game engine powered by SDL3
Installation
python -m pip install luma-engine
Quick Start
Create a file named main.py:
from luma import Luma
engine = Luma()
engine.create_window("Luma", 640, 480)
graphics = engine.Graphics
@engine.draw
def draw():
graphics.setDrawColor(40, 120, 220)
graphics.drawRect(220, 160, 200, 120)
graphics.resetDrawColor()
@engine.update
def update(dt):
# Update game state here. dt is elapsed time in seconds.
pass
@engine.on(Luma.EVENTS.KEYPRESS)
def on_key_press(key):
if key == Luma.Keyboard.SPACE:
print("Space pressed")
engine.run()
Run it with:
python main.py
Examples
The repository includes complete examples in the examples directory, including a Pong game:
python examples/pong.py
Docs
Documentation is available here
Requirements
- Python 3.10 or newer
- An SDL3-compatible system
License
Luma Engine is released under the MIT License.
Release files for luma-engine 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| luma_engine-0.1.9.tar.gz | 4.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luma_engine-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 MB
Release files / luma_engine-0.1.9.tar.gz
| Download URL | luma_engine-0.1.9.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c8aee06b5d9409d4639960e88d1393aa306d3563ad5f6af0a46379782b4146d
|
|
BLAKE2b-256 checksum How to use checksums |
29a185c5fa17576e6f53b4eeacd45ab87211a5c74a6be40d5c38a3c904b8a2eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|
Release files / luma_engine-0.1.9-py3-none-any.whl
| Download URL | luma_engine-0.1.9-py3-none-any.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
404f77496a64da2a90e8d89c3568329083f29f618609bd37582cb9e09add2709
|
|
BLAKE2b-256 checksum How to use checksums |
37e4e6bf2acd697f57c78a8b49698a8ec2f5d7fe4eb3b64cfbbbc324fc30cfe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|