This project is built with Python 3.13, pygame, and uv.
uv is used to manage the virtual environment, dependencies, and running commands.
- Python 3.13 installed
uvinstalled- Install instructions: https://docs.astral.sh/uv/getting-started/installation/
This project expects:
pygame==2.6.1- A local virtual environment in
.venv/created and managed byuv
From an empty directory:
# 1. Create a new uv project
uv init your-project-name
cd your-project-name
# 2. Pin Python to 3.13
uv python pin 3.13
# 3. Create a virtual environment
uv venv
# 4. Activate the virtual environment (Linux/macOS)
source .venv/bin/activate# Create a new project in the current directory
uv init .
# Pin the Python version
uv python pin 3.13
# Create a venv in .venv
uv venv
# Activate venv (Linux/macOS)
source .venv/bin/activate
# Deactivate
deactivate
# Add a dependency
uv add pygame==2.6.1
# Run a module or script in the project environment
uv run -m pygame
uv run python main.py