Skip to main content

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

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luma-engine 0.1.1
File Size Uploaded
luma_engine-0.1.1.tar.gz 6.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for luma-engine 0.1.1
File Interpreter ABI Platform
luma_engine-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / luma_engine-0.1.1.tar.gz

Download URL luma_engine-0.1.1.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7588f783853de03530a2896ffa9b5e7376880c51ebcdbb119a97d338d4a6446b
BLAKE2b-256 checksum
How to use checksums
ff7e21016d7a44ddc7dacdfea18929bf831e7eeb724845f04dc3720eb94e7aa2
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.1-py3-none-any.whl

Download URL luma_engine-0.1.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e72f4c6beb5d75b1bf2126d019e84c6d0eaa4f1cc65a54effb6bac91906cb68c
BLAKE2b-256 checksum
How to use checksums
8b374d0249440e8f87d4f7fd437a82ae2d326804508b5aed88df36ec09c880c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page