PyEngine2D
A Modular 2D Game Engine in Python
PyEngine2D is a scene-graph-based 2D game engine built on top of Pygame. It features 8 decoupled subsystems communicating via an EventBus, designed for a Software Engineering (SEPM) academic project.
Features
- Scene Graph: Node-based architecture (similar to Godot).
- Physics: AABB and Circle collisions, continuous velocity integration, impulses.
- Animation: Spritesheet slicing, framerate-independent clips.
- Camera: Smooth follow, zoom, screen shake, bounds clamping.
- Particles: Fixed-pool particle emitters with built-in presets (Dust, Sparks, Explosion).
- UI System: Screen-space anchors, Buttons, Labels, HealthBars, Minimap.
- Audio: Positional audio, music streaming, master volume control.
- Input: JSON-serialisable action bindings.
Installation
Requires Python 3.10+.
# Install dependencies
pip install -r requirements.txt
Running the Demo Game
"The Lost Relic" is a top-down RPG demo included to showcase all engine features.
# The first run will automatically generate procedural pixel-art assets
python demo/main.py
Controls
- W, A, S, D or Arrows: Move Player
- ESC: Pause Game
- Mouse: Click UI buttons (Menus)
Running Tests
The test suite contains 18 Unit Tests and 8 Integration Tests (covering all PRD acceptance criteria).
# Run pytest on the tests directory
python -m pytest tests/
Documentation
UML Diagrams (Component, Class, Sequence, State) are provided as .puml (PlantUML) files in the docs/uml/ directory. You can view them using the PlantUML VSCode extension or any online PlantUML viewer.
Metadata
Release files for pyengine2d-sagar 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyengine2d_sagar-1.0.0.tar.gz | 39.3 kB | Without provenance | Details for pyengine2d_sagar-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyengine2d_sagar-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyengine2d_sagar-1.0.0-py3-none-any.whl |
Total release size: 90.9 kB
Release files / pyengine2d_sagar-1.0.0.tar.gz
| Download URL | pyengine2d_sagar-1.0.0.tar.gz |
|---|---|
| Size | 39.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad88b43ecb7d9a9bcfb7f76213813e80a3fca97f13f5dc7379b4480ba118ea47
|
|
BLAKE2b-256 checksum How to use checksums |
99014ff5cfb78c57b48d313182f3abd0a85daa3ca4bf866719b27327810973a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / pyengine2d_sagar-1.0.0-py3-none-any.whl
| Download URL | pyengine2d_sagar-1.0.0-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
694a5b10f9c2d4dc0141b9b61cdcb824380198a55d07f420d022fa3fb1e9f5d8
|
|
BLAKE2b-256 checksum How to use checksums |
df6a0225cec21f70befb306c9587c31314b11856844a839d877d7383b8446ed1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for pyengine2d-sagar 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.