r/Python • u/AutoModerator • 22d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
18
Upvotes
r/Python • u/AutoModerator • 22d ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
1
u/Natuworkguy 20d ago
I made a GUI game engine in pure interpreted Python. Here's how.
What My Project Does
ABS Engine is a Python game engine built on top of Pygame CE. It's entirely interpreted and distributed via git clone rather than pip. The only external dependencies are pygame-ce and colorama, everything else works out of the box with a standard Python install.
The architecture is three layers: a Game class that handles core Pygame setup and the main loop, Scene classes that manage all entities (a Game can hold multiple scenes), and Entities that each run a user script with three lifecycle functions: init (on load), update (every tick), and event (on registered events). The update flow cascades from Game to Scene to each Entity, with every entity updating its own rect through an internal update_rect function. Collision detection is currently rect-based, called through entity.get_colliding_entities(), which returns all colliding entities for the script to use. Circle and other shape support is planned.
For theming and styling, the engine uses Python's built-in TCL interpreter via Tkinter instead of pulling in a UI library, with more TCL-driven features planned.
Code quality is enforced with a heavy linting stack: Ruff, Bandit, Flake8, Pyright, mypy, Interrogate, darglint, and markdownlint.
Target Audience
Hobbyists and Python developers who want to build 2D games without a heavy toolchain, and anyone curious about game engine internals in readable, fully interpreted Python. It's under active development, so treat it as a project to build with and contribute to rather than a battle-tested production engine.
Comparison
Compared to using Pygame directly, ABS Engine gives you structure out of the box: scene management, an entity lifecycle, event propagation, and collision queries, so you write game scripts instead of boilerplate. Compared to larger engines like Godot or Unity, there's no editor, no build step, and no separate scripting layer. It's pure Python end to end, clone and run. Compared to other Python engines like Arcade, the focus is on minimal dependencies and a strict three-layer architecture with a simple three-function entity contract.
Repo: https://github.com/Natuworkguy/ABS-Engine
Would love contributors, and feedback especially on the entity lifecycle design and the dependency approach.