LightGameEngine 🎮✨
A Swiss Army knife for Pygame — not a replacement for it.
LightGameEngine is a light Python layer built on top of Pygame: it takes what Pygame already does well and wraps it in the simplest, most reusable way possible, then adds the things Pygame does not provide out of the box — ready-made effects, a friendlier input system, and game UI objects (buttons, modals...) that most people end up rebuilding from scratch in every new project.
The goal is not to compete with full game engines (Godot, Unity), and not to hide Pygame from you either. You keep writing plain Pygame code — this library just saves you from repeating the same boilerplate project after project.
🎯 Philosophy
LightGameEngine aims to be a high-level tool, built to make life easier for people writing games in Python — not to replace Pygame. You still have full access to Pygame whenever you need it; the library just stops you from rewriting, every single time, the things that should already be there: collision, input, basic UI, effects.
🧰 What the library offers today
- Geometry and collision, with no Pygame math dependency (
BoundingBox,RectBoundingBox,CircleBoundingBox, circle-vs-circle, rect-vs-rect, and circle-vs-rect collision). - Thin, chainable wrappers around the window, fonts, images, and sound (
SurfaceScreen,GameFont,Image,SoundEffect,Music). - Extra effects and features Pygame doesn't ship with — today: an image fade-in/fade-out effect, ready for splash screens.
- Better input handling: keyboard (
Keyboard, plus aKeysenum with readable names for every key) and controllers (Joystick, via SDL's GameController API — it recognizes Xbox, PlayStation, Switch, and most third-party controllers under the same button names), plus ready-to-use mouse helpers. - Input alias system (
Alias) — one of the library's biggest differentiators: map game actions ("jump","confirm"...) to one or more keys/buttons, freely mixing keyboard and controller. Your gameplay code just asks "was thejumpaction triggered?" without ever needing to know or care which key or button was pressed — key rebinding without duplicating logic across your code. - Ready-to-use objects:
ButtonandModal, UI components almost every game needs (menus, confirmations, dialogs), with built-in controller navigation (focus + confirm button).
Great for quick prototyping, teaching game programming, or just for anyone who likes writing code by hand instead of reinventing the wheel.
📌 Coming next
- Fully encapsulated scene management
- More ready-to-use UI objects
- A ready-to-use SplashScreen (the image fade effect is already available today)
- Asset support with caching
This project is still in an early stage - follow the weekly posts on my LinkedIn to see its progress, and feel free to jump in with feedback!
🚧 Work in progress - contributions and suggestions are welcome!
Metadata
Release files for LightGameEngine 0.0.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 | |
|---|---|---|---|
| lightgameengine-0.0.3.tar.gz | 28.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lightgameengine-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.6 kB
Release files / lightgameengine-0.0.3.tar.gz
| Download URL | lightgameengine-0.0.3.tar.gz |
|---|---|
| Size | 28.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
571bf13b9cb91d84af40ef3f056750119224efe4b5d0182c6dcd3598c3dd0f59
|
|
BLAKE2b-256 checksum How to use checksums |
f7b11a7bc202268cf926413276ddd6d5a1790610eae7c0fc01e9136cf7ac8092
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / lightgameengine-0.0.3-py3-none-any.whl
| Download URL | lightgameengine-0.0.3-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9960240ef66893c075e51603415759cffa07b600f9144781194eec82cc8a331e
|
|
BLAKE2b-256 checksum How to use checksums |
058e47dd2dbb5f961121492f9c325f35d91313898ad2af5f702a761d79372ead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|