Metadata-Version: 2.4
Name: pyengine2d-sagar
Version: 1.0.0
Summary: A lightweight, modular 2D game engine built on top of Pygame.
Home-page: https://github.com/sagar/pyengine2d
Author: Sagar
Author-email: sagar@example.com
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Games/Entertainment
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pygame>=2.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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+.

```bash
# 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.

```bash
# 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).

```bash
# 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.
