A Python game project built with pygame-ce, featuring AI components and modern Python tooling.
-
Install uv (if not already installed):
pip install uv
-
Create and activate a virtual environment:
uv venv uv pip sync requirements.txt
-
Install development dependencies:
uv pip install -e ".[dev]"
uv run python src/main.py
- Linting and Formatting:
uv run ruff check . && uv run ruff format .
- Type Checking: (Add mypy if needed)
- Testing:
uv run pytest
src/
├── main.py # Entry point
├── game/ # Game logic
│ ├── __init__.py
│ ├── engine.py # Game engine
│ ├── entities.py # Game entities
│ └── scenes.py # Game scenes
├── ai/ # AI components
│ ├── __init__.py
│ └── agents.py # AI agents
└── utils/ # Utilities
├── __init__.py
└── constants.py # Game constants
tests/ # Test files
assets/ # Game assets (images, sounds, etc.)
- Python 3.11+
- pygame-ce 2.5.0+
- uv for dependency management
- Run tests:
uv run pytest
- Check code quality:
uv run ruff check . && uv run ruff format .
- Ensure all tests pass before committing