Skip to main content

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 a Keys enum 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 the jump action 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: Button and Modal, 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.2

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

Source distribution (sdist)

Source distribution for LightGameEngine 0.0.2
File Size Uploaded
lightgameengine-0.0.2.tar.gz 25.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for LightGameEngine 0.0.2
File Interpreter ABI Platform
lightgameengine-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 49.4 kB

Release files / lightgameengine-0.0.2.tar.gz

Download URL lightgameengine-0.0.2.tar.gz
Size 25.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0025aae1b8148c31c2ff41c6fb859f77a3555745b6a144275f251e7bb431b759
BLAKE2b-256 checksum
How to use checksums
2601b8c196c98319616169b121135f7e17e3e8e563e3ce0c32dfc1a470420a79
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.2-py3-none-any.whl

Download URL lightgameengine-0.0.2-py3-none-any.whl
Size 23.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4067cba95b73d7d4fc88d626a4cb75a01627859bde315360905b9dde33e7328c
BLAKE2b-256 checksum
How to use checksums
5b2ca6af6d4211c95c4bcacd0ea643ca62de6081ada42fcd32e2ee3150fa2eb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.0.4

2 release files

0.0.3

2 release files

This release

0.0.2 This release

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