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 font demo and a Pong game:
python examples/font.py
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.1
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.1.tar.gz | 5.4 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luma_engine-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 MB
Release files / luma_engine-0.2.1.tar.gz
| Download URL | luma_engine-0.2.1.tar.gz |
|---|---|
| Size | 5.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46a0ae8396ecd1f878c15bae0e0688e5be625c7128668486bdca6c2b381c4738
|
|
BLAKE2b-256 checksum How to use checksums |
d2bf4c4444fa9fbdb88038fbf7e5c15a214ad2889a05810279408a46610f1124
|
| 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.1-py3-none-any.whl
| Download URL | luma_engine-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c09fa7940dd7c166f61839085d28109309e1a3f72d68e58d078f92e9fc27334b
|
|
BLAKE2b-256 checksum How to use checksums |
73d82740e60f15a5a4a96e76f688fdbc53043b9033e54aa3c163afa8fb50bd3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|