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.5
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.5.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| luma_engine-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.0 kB
Release files / luma_engine-0.1.5.tar.gz
| Download URL | luma_engine-0.1.5.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dfd31dac36db8f75fab0d066c84499bf27192de6b6ada5caff2e92075d2138e
|
|
BLAKE2b-256 checksum How to use checksums |
404c3c939c93c3b92f92752529189a28ad8a0ad5d9a3b75609b795c3606d6183
|
| 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.5-py3-none-any.whl
| Download URL | luma_engine-0.1.5-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae2ea211e4a9ddb01cd001d40c23c18d6627bae753b028713b4084b2639b3b71
|
|
BLAKE2b-256 checksum How to use checksums |
8998c53db8e49f5ca20d1807e66deefb194d6a4e46f9a49871425847a7db5f71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.1
|