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.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.8 or newer
- An SDL3-compatible system
License
Luma Engine is released under the MIT License.
Release files for luma-engine 0.1.2
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.2.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luma_engine-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / luma_engine-0.1.2.tar.gz
| Download URL | luma_engine-0.1.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4565ffacbe2b30ae24d1d2db9b44ee22e29714e5a596f7bf96339c16076225b
|
|
BLAKE2b-256 checksum How to use checksums |
80af1975f8f3ec834243385ecc48e355ed8dd8d40e3aa74e0ab58f2189dbbca2
|
| 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.2-py3-none-any.whl
| Download URL | luma_engine-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14d11a02f789f1c6b62b9658a2d1923f91346aa089d2be0d3d92aee644a33262
|
|
BLAKE2b-256 checksum How to use checksums |
6389e5637f58c5c5830cdcf39dbdc9498ef6a1c495d6af035f64de72dac2e3fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|