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 == engine.Keyboard.KEYS.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.2.3
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.2.3.tar.gz | 6.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luma_engine-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 MB
Release files / luma_engine-0.2.3.tar.gz
| Download URL | luma_engine-0.2.3.tar.gz |
|---|---|
| Size | 6.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2b61f27bd683b3be515051e50f5ced8e45f5a8dde9f0c838466b55b19387c2e
|
|
BLAKE2b-256 checksum How to use checksums |
2f79f30f006ca85d9d6cfab6f4149e85461eccae2a75749726e2808bf83c16a4
|
| 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.2.3-py3-none-any.whl
| Download URL | luma_engine-0.2.3-py3-none-any.whl |
|---|---|
| Size | 6.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64712b6586f129884e328dcdc181651fc05d5342f0d6a54716cc9b76787372f8
|
|
BLAKE2b-256 checksum How to use checksums |
e8d552295e3e47609730a4c50287c612970ae0d2e65948404e76b66f16e2c970
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|